Re: [PATCH] lockref: remove cpu_relax() again

From: Linus Torvalds
Date: Thu Sep 05 2013 - 15:21:16 EST


On Thu, Sep 5, 2013 at 11:57 AM, Luck, Tony <tony.luck@xxxxxxxxx> wrote:
>
> Not "tons", just two. You can ask for "acquire" or "release" semantics,
> there is no relaxed option.

Seriously? You can't just do a cache-coherent cmpxchg without extra
serialization? Oh well.

> Worse still - early processor implementations actually just ignored
> the acquire/release and did a full fence all the time. Unfortunately
> this meant a lot of badly written code that used .acq when they really
> wanted .rel became legacy out in the wild - so when we made a cpu
> that strictly did the .acq or .rel ... all that code started breaking - so
> we had to back-pedal and keep the "legacy" behavior of a full fence :-(

Ugh. Can you try what happens with the weaker release-semantics
performance-wise for that code? Do it *just* for the lockref code..

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/