Messages in this thread | | | Date | Tue, 08 Jul 2008 08:58:36 -0700 | From | Jeremy Fitzhardinge <> | Subject | Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoid spin with irqs disable |
| |
Nick Piggin wrote: > Sure. Btw. I have no problems with your patchset, but if SMP guests > are seriously used on x86, just remember the fairness issue. At some > point you might find you'll need an even more advanced lock for Xen. >
Perhaps. The spin lock has a bounded number of iterations before it goes into the vcpu-blocking path. At that point, it's no longer subject to the whims of the cache coherency protocol, and is explicitly woken. But it may still have issues when competing with a rapid lock-unlocker.
A ticket-lock variant with some kind of directed yield might be the way to go if it turns out to be a problem.
J
| |