[PATCH] MAXCPU alterable in kernel config - needs testers

David Xu davidxu at freebsd.org
Sun Oct 8 19:06:59 PDT 2006


On Monday 09 October 2006 09:18, Kip Macy wrote:
> > Wouldn't having a single run queue lock still serialize the cpu's when
> > getting a thread to run?  Don't we really need a per cpu run queue, and
> > then have a scheduler that puts threads on the cpu's run queues?
>
> Balancing run queues has overhead as well. From what I've seen having
> threads bouncing back and forth between the sleep queue and the run
> queue because sleep / wakeup is overused (see lockmgr) is a bigger deal
> right now. Moving to multiple run queues is inappropriate at this time.
>
>
> 					-Kip

If single sched_lock is not removed, it even is not worthy of trying mutliple 
run queues, since any time you spent under sched_lock will be scaled to
N times, where N is the number of CPU, in worst case. This makes load-balance
a bit useless. 

David Xu


More information about the freebsd-current mailing list