Subject: Re: more funky stuff with kthreads and interrupts
To: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
From: Ken Wellsch <kwellsch@tampabay.rr.com>
List: port-pmax
Date: 05/08/2001 17:52:45
My 5000/150 is now able to keep time (via NTP) and run a "make build"
at the same time - thank you very much!!! -- Ken
Toru Nishimura wrote:
>
> Attention please. This is a hot fix.
>
> /// DESCRIPTION ///
> NetBSD/mips users have been suffered from general slowness or severe
> clock drift when system activity is high. Other camps of NetBSD
> ports were found recently to run system kthreads (pagedaemon,
> ioflush, reaper, aiodoned) in splhigh condition. And then NetBSD/mips
> was proven to have the same error.
>
> I thought NetBSD/mips was immune from it as pcb0 was forced to have
> spl0 condition which was propagated to all of children, but it was a
> wrong fix. The issue is pcb0 gets overwritten before the first
> kthread_create1() is called. For a normal process which has user mode
> it doesn't matter because proc_trampoline() makes the process to have
> spl0 during exception return path to user mode, however, kthreads stay
> in kernel mode mistakenly left in splhigh condition.
>
> /// FIX ///
> Make sure to have spl0 condition whenever a new thread of control
> is created.
>
> /// COMMENT ///
> This is another, probably the 3rd, occation where processor
> is forced to have explicit "interrupt level" assignment for SR.
>
> Tohru Nishimura
> Information Technology Centre
> Nara Institute of Science and Technology