From owner-freebsd-current@FreeBSD.ORG Wed Nov 29 22:41:02 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A49CC16A494; Wed, 29 Nov 2006 22:41:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id B15D443CD6; Wed, 29 Nov 2006 22:40:48 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kATMejpI071844; Wed, 29 Nov 2006 15:40:51 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <456E0C66.4060404@samsco.org> Date: Wed, 29 Nov 2006 15:40:38 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 MIME-Version: 1.0 To: John Birrell References: <45622068.2050705@student.tue.nl> <200611291204.03716.jhb@freebsd.org> <20061129223221.GA359@what-creek.com> In-Reply-To: <20061129223221.GA359@what-creek.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: Rene Ladan , jb@freebsd.org, freebsd-current@freebsd.org Subject: Re: calcru-triggered panic? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 22:41:02 -0000 John Birrell wrote: > On Wed, Nov 29, 2006 at 12:04:03PM -0500, John Baldwin wrote: >> On Monday 20 November 2006 16:38, Rene Ladan wrote: >>> Hi, >>> >>> I got the attached panic on CURRENT 2006-11-17. >>> >>> It was preceded by a lot of 'calcru' messages. >> The calcru messages you can ignore. >> >> This is the real problem: >> >> panic: blockable sleep lock (sleep mutex) tty >> @ /usr/src-current/sys/kern/kern_event.c:1670 >> >> This panic is due to the recent changes to printf to try to buffer the printf >> output. It now runs cnputc() under a critical section and syscons(4) tries >> to do a ttwakeup() which invokes KNOTE() and tries to lock a regular mutex >> while inside the critical section. I'm not sure how best to fix this. > > I would like to go back to using a printf buffer on the stack > (like I had in my original implementation). The downside of > doing that is that it places more stress on the stack and for > things like cam, that is an issue, so I am told. > > -- > John Birrell It's probably less of an issue now that it used to be, since I/O is decoupled through GEOM threads. In 4.x, you could have a stack that went from the syscall, through VFS, UFS, the block layer, CAM, and finally the device driver. When I was working on RAIDFrame, adding just a couple hundred bytes of stack usage would cause it to blow out. But as I said, it might not be as much of an issue now. Scott