Alu Powerbook
John Baldwin
jhb at FreeBSD.org
Mon Feb 9 12:46:19 PST 2004
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 <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-ppc
mailing list