> On 17 Dec 2013, at 12:00, cinap_len...@felloff.net wrote:
> 
> thats a surprising result. by dog pile lock you mean the runq spinlock no?
> 

I guess it depends on the HW, but I donĀ“t find that so surprising. You are 
looping
sending messages to the coherency fabric, which gets congested as a result.
I have seen that happen.

You should back off, but sleeping for a fixed time is not a good solution 
either.
Mwait is a perfect solution in this case, there is some latency, but you are in 
a bad
place anyway and with mwait, performance does not degrade too much.

Even for user space where the spinlocks backoff sleeping,
if you get to that point, your latency goes off the roof.
Latency is worse than using mwait because you are sleeping unconditionally. 
Mwait does not prevent you from getting the interrupt to schedule.
In most cases mwait is better for performance to back off in spinlocks in 
general.
It is also good for power which may prevent cooling slowdowns of the clock too.

G.


Reply via email to