> >Perhaps. So one detail that may be important here, is the balancing > >is performed between the per priority queues, not the CPUs total run > >queue. The idea is that if you have some threads at priority 0, some > >at priority 10, and some at 20, that you'll have a fairly even > >distribution of 0, 10, and 20 priority threads waiting for each CPU. > >Otherwise, all the low priority threads could pile up on and run on > >one CPU, while higher priority threads sit in another CPU's queue. > >The code tries to achieve a "parfait" sort of effect. :) > > But even in this case, it makes no sense to have one processor > completely idle, right?
That's unlikely to happen. The idle() loop calls disp_getwork(). This function looks for a new task to run, and when appropriate, it may steal threads from other busy CPUs. -j _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
