On Sun, Apr 11, 2010 at 11:40 PM, Avi Kivity <avi@xxxxxxxxxx <mailto:avi@xxxxxxxxxx>> wrote:
The current handing of PLE is very suboptimal. With proper
directed yield we should be much better there.
Hi Avi,
By directed yield, do you mean transfer the timeslice of one thread (which is contending for a lock) to another thread (which is holding a lock)?
If at that point in time, the lock-holder thread/VCPU is actually not running currently, ie it is at the back of the runqueue, would it help much? In such case, it will take time for the lock holder to run again and the default timeslice it would have got could have been sufficient to release the lock?
I am also working on a prototype for some other technique here - to avoid preempting guest threads/VCPUs in the middle of their (spin-lock) critical section. This requires guest to hint host when there are in such a section. [1] has shown 33% improvement to an apache benchmark based on this idea.