From owner-freebsd-current@FreeBSD.ORG Thu Dec 29 16:24:26 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76AB1065673; Thu, 29 Dec 2011 16:24:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8E29E8FC16; Thu, 29 Dec 2011 16:24:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 4481246B3F; Thu, 29 Dec 2011 11:24:26 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 99F8BB93A; Thu, 29 Dec 2011 11:24:25 -0500 (EST) From: John Baldwin To: Larry Rosenman Date: Thu, 29 Dec 2011 11:17:49 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <4EF48065.8000802@lerctr.org> <4EF4AF5C.1060000@lerctr.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112291117.49679.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 Dec 2011 11:24:25 -0500 (EST) Cc: Alexander Motin , freebsd-current@freebsd.org Subject: Re: scheduler 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: Thu, 29 Dec 2011 16:24:26 -0000 On Sunday, December 25, 2011 10:48:32 am Larry Rosenman wrote: > On Fri, 23 Dec 2011, Larry Rosenman wrote: > > On 12/23/2011 8:54 AM, John Baldwin wrote: > >> The sloppiest fix might be to do this: > >> > >> Index: sched_ule.c > >> =================================================================== > >> > >> > > - --- sched_ule.c (revision 228777) > >> +++ sched_ule.c (working copy) @@ -1434,7 +1434,8 @@ > >> sched_priority(struct thread *td) } else { pri = SCHED_PRI_MIN; if > >> (td->td_sched->ts_ticks) - pri += SCHED_PRI_TICKS(td->td_sched); > >> + pri += min(SCHED_PRI_TICKS(td->td_sched), + > >> SCHED_PRI_RANGE); pri += SCHED_PRI_NICE(td->td_proc->p_nice); > >> KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, > >> ("sched_priority: invalid priority %d: nice %d, " > >> > > > > I've applied this to both the host and the guest, and am recompiling > > the guest kernel (hopefully it'll stay up long enough...). > > > > I'll report back. > > > > Do y'all (FreeBSD Devs) want a PR? > > > > > I've run 2 complete buildworld/buildkernel cycles with the patch applied > in the guest, and it's made it all the way through. It wouldn't > do that without it. > > Can we get this (or something else like it) applied? > > Do I need to file a PR? I've committed this. I do think the root problem is an issue with the clock interrupts, but this seems to be a common enough problem I think a workaround is warranted. -- John Baldwin