:> :can you detail in more clarity the flip-flopping you were seeing?
:> Basically what is happening is that switch/wakeup overhead is being
:> imposed unnecessarily. There is no need to switch if there is nothing
:> to switch to, and this also causes the other process to not have to
:> wakeup anyone when it releases Giant because process #1 is spinning
:> on it instead of sleeping on it. So you immediate remove four context
:> switches from the critical path.
:true, though the original code would halt the processor to reduce power
:consumption on laptops etc. procrunnable doesn't include the idle
:process. (a side-effect).
That would still work, the spin only occurs when multiple cpus are vying
for a sleep lock. But it's moot now, something isn't working as expected.
It's as though procrunnable() is broken.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message