Messages in this thread | | | Date | Tue, 29 Jun 2010 15:30:22 +0100 | From | "Jan Beulich" <> | Subject | [PATCH 0/4, v2] x86: enlightenment for ticket spin locks |
| |
With the pv-ops based spinlocks reportedly having measurable overhead on native execution, and with them also not easily fit (at least) fully virtualized Xen guests, this patch series introduces a replacement mechanism based on alternative instruction patching, and then uses it for fully virtualized Xen guests. While coded to be orthogonal to pv-ops, it really isn't, and it shouldn't be difficult to make pv-ops guests use this in place of pv-ops spin locks.
The only additional overhead this introduces for native execution is (in the optional fourth patch) the writing of the owning CPU in the lock acquire paths. If this is considered a problem but the patch otherwise is deemed useful, even that code could be eliminated for native execution (by further alternative instruction patching).
(1) base implementation (2) Xen implementation (3) [optional] eliminate NOPs in unlock path (introduced in (1)) (4) [optional] improve behavior on Xen by yielding earlier in certain cases
Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: KY Srinivasan <ksrinivasan@novell.com>
| |