cvs commit: src/sys/kern kern_switch.c

John Baldwin jhb at FreeBSD.org
Thu Sep 16 09:58:30 PDT 2004


On Thursday 16 September 2004 08:38 am, Dag-Erling Smørgrav wrote:
> Julian Elischer <julian at FreeBSD.org> writes:
> >   Log:
> >   e specific code to revert a partial add ot teh run queue, not
> >   remrunqueue() which can't handle a partially added thread.
>
> begyerpar'n?

The earlier fix to maybe_preempt() would call 'remrunqueue()' to have a thread 
that is being preempted to removed from its ksegroup runqueue, however, 
remrunqueue() is for removing the thread from all runqueues, and it is 
probably not really safe to call that as the thread is not in a full runqueue 
state so to speak. Thus, Julian inlined specific code to just remove the 
thread from the ksegroup runqueue.  I do wonder if that code shouldn't at 
least be consolidated into a function that is called by remrunqueue(), 
adjustrunqueue(), and maybe_preempt().  Also, the commit message could use a 
bit more detail. :)

-- 
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 cvs-src mailing list