Re: [RFC][PATCH 6/8] mm: handle_speculative_fault()

From: Linus Torvalds
Date: Tue Jan 05 2010 - 16:01:07 EST




On Tue, 5 Jan 2010, Linus Torvalds wrote:
>
> I think you need a "compare-and-exchange-2-separate-words" instruction
> to make it work (not "cmpxchg8/16b" - literally two _different_ words).

Btw, I might be misremembering - Andy was looking at various lockless
algorithms too. Maybe the problem was the non-local space requirement.
There were several spin-lock variants that would be improved if we could
pass a cookie from the 'lock' to the 'unlock'.

In fact, even the ticket locks would be improved by that, since we could
then possibly do the unlock as a plain 'store' rather than an 'add', and
keep the nex-owner cookie in a register over the lock rather than unlock
by just incrementing it in the nasty lock cacheline.

Linus
--
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/