From owner-freebsd-current Thu Mar 1 20:50:21 2001 Delivered-To: freebsd-current@freebsd.org Received: from cr66388-a.rchrd1.on.wave.home.com (cr66388-a.rchrd1.on.wave.home.com [24.114.165.24]) by hub.freebsd.org (Postfix) with ESMTP id 5DC9B37B719 for ; Thu, 1 Mar 2001 20:50:18 -0800 (PST) (envelope-from jburkholder0829@home.com) Received: from cr66388-a.rchrd1.on.wave.home.c (localhost [127.0.0.1]) by cr66388-a.rchrd1.on.wave.home.com (Postfix) with ESMTP id 23221BACC; Thu, 1 Mar 2001 23:50:17 -0500 (EST) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Kris Kennaway Cc: current@FreeBSD.ORG Subject: Re: Scheduler panic In-Reply-To: Message from Jake Burkholder of "Thu, 01 Mar 2001 21:35:47 EST." <20010302023548.4F733BACC@cr66388-a.rchrd1.on.wave.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 01 Mar 2001 23:50:16 -0500 From: Jake Burkholder Message-Id: <20010302045017.23221BACC@cr66388-a.rchrd1.on.wave.home.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG replying to myself again.... > > This is the best workaround I can think of: > > Index: kern/kern_intr.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/kern_intr.c,v > retrieving revision 1.47 > diff -u -r1.47 kern_intr.c > --- kern/kern_intr.c 2001/02/28 02:53:43 1.47 > +++ kern/kern_intr.c 2001/03/02 02:28:08 > @@ -366,7 +366,7 @@ > */ > ithread->it_need = 1; > mtx_lock_spin(&sched_lock); > - if (p->p_stat == SWAIT) { > + if (p->p_stat == SWAIT && curproc->p_stat == SRUN) { > CTR1(KTR_INTR, __func__ ": setrunqueue %d", p->p_pid); > p->p_stat = SRUN; > setrunqueue(p); Heh. Sorry this is wrong, the test for SRUN should be in the same if statement as the do_switch, one further in. This will completetly miss interrupts if the race is ever hit... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message