From owner-freebsd-ppc@FreeBSD.ORG Mon Feb 9 06:32:16 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 CBB5F16A4CE for ; Mon, 9 Feb 2004 06:32:16 -0800 (PST) Received: from liberty.onthenet.com.au (liberty.OntheNet.com.au [203.22.124.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5130443D2F for ; Mon, 9 Feb 2004 06:32:16 -0800 (PST) (envelope-from grehan@freebsd.org) Received: from freebsd.org (CPE-30-4.dsl.onthenet.net [203.144.30.4]) i19EWEZG094640; Tue, 10 Feb 2004 00:32:14 +1000 (EST) (envelope-from grehan@freebsd.org) Message-ID: <40279A60.4060002@freebsd.org> Date: Tue, 10 Feb 2004 00:34:08 +1000 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030524 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Suleiman Souhlal References: <20040206000245.20a84f0c@zZzZ.segfaulted.com> <40232DA3.5090508@freebsd.org> <20040206013218.4eb1cd37@zZzZ.segfaulted.com> <40235C60.9010509@freebsd.org> <20040206115743.2f6ad7af@zZzZ.segfaulted.com> <402450B7.9030106@freebsd.org> <20040208224036.6f1fb172@zZzZ.segfaulted.com> <402731BD.3070703@freebsd.org> <20040209023918.079ec9f5@zZzZ.segfaulted.com> <402740C9.1050506@freebsd.org> <20040209084040.6718d16e@zZzZ.segfaulted.com> In-Reply-To: <20040209084040.6718d16e@zZzZ.segfaulted.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 14:32:16 -0000 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. When the second param is 1, the current thread is immediately switched over to the interrupt thread, which should run to completion. If it is 0, the ithread will be run when the user-thread returns to user-space, with the switch done in subr_trap.c:ast(). 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. 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. later, Peter.