Re: [PATCH RFC V9 0/19] Paravirtualized ticket spinlocks
From: Andi Kleen
Date: Sat Jun 01 2013 - 16:46:23 EST
On Sat, Jun 01, 2013 at 01:28:00PM -0700, Jeremy Fitzhardinge wrote:
> On 06/01/2013 01:14 PM, Andi Kleen wrote:
> > FWIW I use the paravirt spinlock ops for adding lock elision
> > to the spinlocks.
>
> Does lock elision still use the ticketlock algorithm/structure, or are
> they different? If they're still basically ticketlocks, then it seems
> to me that they're complimentary - hle handles the fastpath, and pv the
> slowpath.
It uses the ticketlock algorithm/structure, but:
- it needs to know that the lock is free with an own operation
- it has an additional field for strong adaptation state
(but that field is independent of the low level lock implementation,
so can be used with any kind of lock)
So currently it inlines the ticket lock code into its own.
Doing pv on the slow path would be possible, but would need
some additional (minor) hooks I think.
-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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/