Date: Tue, 10 Feb 2004 11:24:16 -0500 From: John Baldwin <jhb@FreeBSD.org> To: Peter Grehan <grehan@freebsd.org> Cc: freebsd-ppc@freebsd.org Subject: Re: Alu Powerbook Message-ID: <200402101124.16372.jhb@FreeBSD.org> In-Reply-To: <40283173.1010706@freebsd.org> References: <20040206000245.20a84f0c@zZzZ.segfaulted.com> <200402091433.20467.jhb@FreeBSD.org> <40283173.1010706@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 09 February 2004 08:18 pm, Peter Grehan wrote: > Hi John, > > A few questions: > >> 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. > > Are there any gotchas as to what defines "can handle it" ? Doesn't lockup or panic under load. :) > With the '!cold' case on 386/amd64, is that because threads running > up until that point assume that interrupts can't be delivered, or > shouldn't be pre-empted since they're kernel threads ? cold is only true before the scheduler is ready to run ithreads during early boot. The current thread is always thread0. Currently cold is set for the new-bus boot probe and cleared afterwards. Preemption should be avoided because it's not safe to switch yet. > And lastly, whereabouts in interrupt processing would the > oft-talked-about 'context stealing' occurr ? Is it ithread-schedule, > or in MD code before that gets called ? It would have to be in MD code. The MD code may end up re-implementing ithread_schedule() and using a modified version of ithread_loop(). However, just getting it working using a regular context switch is a good first step. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402101124.16372.jhb>