On Sat, Feb 01, 2003 at 01:28:45PM -0800, Terry Lambert wrote: > Bosko Milekic wrote: > > > > Or, as I explained in my previous post, only HLT the [virtual] CPU if > > > > the other [virtual] CPU that is sharing the same execution & cache > > > > units is not HLT'd itself. If the other one is HLT'd, then not do the > > > > HLT. > > > > > > Actually, why is that? Why would you not want to HLT all the > > > units that are not being used? > > > > Because, the comment explains, a halted CPU will not pick up a new > > thread off the run queue until the next timer tick. So if all your > > logical units are idled then you can afford to just loop checking > > whether something is runnable without interfering with the performance > > of other threads running on a different logical cpu sharing your > > execution unit (because the other logical units are idle anyway). > > That way, you don't have to necessarily wait for the next timer tick > > to check whether something is runnable, especially if it's made > > runnable before. The disadvantage is that you don't really economize > > on power consumption. > > There's an assumption in there of a shared scheduler queue, and a > lack of CPU affinity (or negaffinity, for multiple threads in a > single process), isn't there?
Well, euh, yeah, the runqueue was global the last time I checked (Jeff R.'s new stuff aside). Maybe I'm just out of it, I don't know. [... other probably meaningful stuff that makes the assumption that we do have per-CPU queues protected by their own locks ...] -- Bosko Milekic * [EMAIL PROTECTED] * [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message