From owner-freebsd-ppc@FreeBSD.ORG Mon Feb 9 12:46:19 2004 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB9CB16A4D0 for ; Mon, 9 Feb 2004 12:46:19 -0800 (PST) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0EB643D1F for ; Mon, 9 Feb 2004 12:46:19 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 28783 invoked from network); 9 Feb 2004 20:46:15 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 9 Feb 2004 20:46:15 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i19KjrM4082127; Mon, 9 Feb 2004 15:46:10 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Peter Grehan , Suleiman Souhlal Date: Mon, 9 Feb 2004 14:33:20 -0500 User-Agent: KMail/1.5.4 References: <20040206000245.20a84f0c@zZzZ.segfaulted.com> <20040209084040.6718d16e@zZzZ.segfaulted.com> <40279A60.4060002@freebsd.org> In-Reply-To: <40279A60.4060002@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402091433.20467.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-ppc@freebsd.org Subject: Re: Alu Powerbook X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 20:46:19 -0000 On Monday 09 February 2004 09:34 am, Peter Grehan wrote: > Hi Suleiman, > > > After a long night of compiling the kernel countless times, I have > > found what was wrong. The TDF_NEEDRESCHED flag kept being set to the > > init thread, which, to my understanding, shouldn't happen, as it runs in > > the userland. The (very simple) patch is attached. I can now get to > > multi-user. > > That type of debugging takes a huge amount of persistence: thankyou > for your effort !! Now, onto the bug: > > The second argument of ithread_schedule determines if the current > thread can be pre-empted. The sparc64 and ia64 ports both leave this > as zero, and ppc followed suit to be conservative. Actually, it should be turned on for each arch that can handle it. However, it should be !cold as in i386 case as it isn't safe to switch yet when cold is set. Alpha doesn't have it on as the last time I tried it on SMP it caused hangs under load. I do not know why other archs have it disabled. > There's a couple of possibilities: > > - I messed up the AST/RESCHED asm code in the recent trap update. > Probable. > > - the cutover to ULE changed some scheduling dynamics. Not that likely > this early in the boot. > > - there is an interrupt storm that is never allowing init to return to > user space. Mildly probable, and should show up under tracing. show intrcnt from ddb should help determine if this is the case, too. > I'd probably like to determine what the culprit is before committing > your fix, since as the '0' parameter has worked fine and continues to > do so on at least my test machines, I suspect there is another bug being > masked. Agreed. Preemption is desired and will result in decreased interrupt latency, but it shouldn't be required. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org