From owner-freebsd-current Wed Jul 17 6:48: 7 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B922D37B400 for ; Wed, 17 Jul 2002 06:48:03 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ED9843E64 for ; Wed, 17 Jul 2002 06:48:03 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 19209 invoked from network); 17 Jul 2002 13:48:00 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 17 Jul 2002 13:48:00 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g6HDln056859; Wed, 17 Jul 2002 09:47:49 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020717134948.G3565-100000@gamplex.bde.org> Date: Wed, 17 Jul 2002 09:48:00 -0400 (EDT) From: John Baldwin To: Bruce Evans Subject: Re: VOP_GETATTR panic on Alpha Cc: Andrew Gallatin Cc: Andrew Gallatin , Andrew Kolchoogin , current@FreeBSD.org 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 17-Jul-2002 Bruce Evans wrote: > On Tue, 16 Jul 2002, John Baldwin wrote: > >> On 17-Jul-2002 Bruce Evans wrote: >> >> mtx_lock_spin(&sched_lock); >> >> if (cold || panicstr) { >> >> /* >> >> * After a panic, or during autoconfiguration, >> >> * just give interrupts a chance, then just return; >> > ^^^^^^^^^^^^^^^^^^^^^^^^ >> > >> > This is the rotted comment. No chance is given here. >> >> Well, when you unlock sched_lock you give ithreads a chance to run. (This >> is only true in a fully preemptive kernel though.) > > It now only releases the lock that it aquired. splx(safepri) gave a > nesting-violating unlocking corresponding to releasing the caller(s) > locks. However, it is probably a bug to call msleep() with sched_lock > held, so releasing sched_lock would release it completely but not give > interrupts any better chance than they had to begin with. Well, the only other locks the caller can hold is the mutex passed in and we also release that as well, which could free up ithreads blocked on that lock. > Bruce -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "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