From owner-freebsd-current Mon Oct 15 15:21:50 2001 Delivered-To: freebsd-current@freebsd.org Received: from femail30.sdc1.sfba.home.com (femail30.sdc1.sfba.home.com [24.254.60.20]) by hub.freebsd.org (Postfix) with ESMTP id 7D32B37B410 for ; Mon, 15 Oct 2001 15:21:48 -0700 (PDT) Received: from laptop.baldwin.cx ([24.2.39.156]) by femail30.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011015222148.VIZR24280.femail30.sdc1.sfba.home.com@laptop.baldwin.cx>; Mon, 15 Oct 2001 15:21:48 -0700 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 15 Oct 2001 15:21:47 -0700 (PDT) From: John Baldwin To: Dag-Erling Smorgrav Subject: Re: Strike three, you're out Cc: freebsd-current@FreeBSD.ORG, Doug Barton , Sheldon Hearn Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 13-Oct-01 Dag-Erling Smorgrav wrote: > Sheldon Hearn writes: >> Perhaps the analogous solution is to be more careful about the use of >> printf() in the kernel? Perhaps a similar approach as is used in >> userland signal handlers should be taken, where a flag is set and later >> the printf() is performed conditional on the state of the flag? > > I think the correct approach would be for printf() to store the > printed text in a circular buffer if it detected that printing it > would cause a locking violation, and for some other part of the kernel > to check and empty the circular buffer regularly, in a safe context. Something like that, yes. Chuck Paterson has patches to do all this for our printf() if I can extract them. It basically ends up with 3 different versions of printf in the kernel. I'll see if I can't get ahold of them. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message