Re: [PATCH 1/4, v2] x86: enlightenment for ticket spin locks -base implementation

From: Peter Zijlstra
Date: Wed Jun 30 2010 - 04:05:53 EST


On Tue, 2010-06-29 at 15:31 +0100, Jan Beulich wrote:
> Add optional (alternative instructions based) callout hooks to the
> contended ticket lock and the ticket unlock paths, to allow hypervisor
> specific code to be used for reducing/eliminating the bad effects
> ticket locks have on performance when running virtualized.

Uhm, I'd much rather see a single alternative implementation, not a
per-hypervisor lock implementation.

> For the moment, this isn't intended to be used together with pv-ops,
> but this is just to simplify initial integration. The ultimate goal
> for this should still be to replace pv-ops spinlocks.

So why not start by removing that?

> +config ENLIGHTEN_SPINLOCKS

Why exactly are these enlightened? I'd say CONFIG_UNFAIR_SPINLOCKS would
be much better.

> +#define X86_FEATURE_SPINLOCK_YIELD (3*32+31) /* hypervisor yield interface */

That name also sucks chunks, yield isn't a lock related term.

> +#define ALTERNATIVE_TICKET_LOCK \

But but but, the alternative isn't a ticket lock..!?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/