From owner-freebsd-current Tue Jul 16 12:54:14 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 CF23B37B400; Tue, 16 Jul 2002 12:54:11 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A0DC43E5E; Tue, 16 Jul 2002 12:54:07 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id PAA24675; Tue, 16 Jul 2002 15:54:06 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g6GJraC52005; Tue, 16 Jul 2002 15:53:36 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15668.31168.555993.138907@grasshopper.cs.duke.edu> Date: Tue, 16 Jul 2002 15:53:36 -0400 (EDT) To: John Baldwin Cc: current@FreeBSD.org Subject: Re: VOP_GETATTR panic on Alpha In-Reply-To: References: <15668.27229.270084.969951@grasshopper.cs.duke.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 John Baldwin writes: > > > > So its still stuck in msleep. How is it supposed to get back to > > the panic'ed thread if a system thread wakes up and is not allowed to > > go back to sleep??? > > Hmmmmm. Surprised we don't see this on other archs then (or maybe > we do...). Probably when we have panic'd (and after we leave the > debugger and go into boot() or some such) we should take any non-P_SYSTEM > processes off the run queues and then remove the panicstr checks from > msleep() and the condition variable wait functions. Do you have something like the following psuedo code in mind? Perhaps placed just prior to the call to boot() in panic()? foreach p in (all procs in system) { if (p == curproc) continue if (p->p_flag & P_SYSTEM) continue; foreach td in (all threads in p) if (td->td_state == TDS_RUNQ) remrunqueue(td); } I assume a panic will IPI other processors and halt them in their tracks so we don't need to worry too much about locking? > Perhaps better is to dink around in choosethread() so that if panicstr > is set, we throw away any threads get that aren't P_SYSTEM or have the > TDF_INPANIC flag set. By throw away, I mean that we just ignore any such > threads and loop if we get one we want to throw away. I think that I like your first idea better.. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message