Alu Powerbook
Peter Grehan
grehan at freebsd.org
Mon Feb 9 06:32:16 PST 2004
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.
More information about the freebsd-ppc
mailing list