Messages in this thread | | | Date | Tue, 5 Jan 2010 13:00:18 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [RFC][PATCH 6/8] mm: handle_speculative_fault() |
| |
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
| |