On Wed, Oct 28, 2015 at 06:33:56AM +0900, Linus Torvalds wrote:
On Wed, Oct 28, 2015 at 4:53 AM, Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote:
>
> Note that this might affect callers that could/would rely on the
> atomicity semantics, but there are no guarantees of that for
> smp_store_mb() mentioned anywhere, plus most archs use this anyway.
> Thus we continue to be consistent with the memory-barriers.txt file,
> and more importantly, maintain the semantics of the smp_ nature.
So with this patch, the whole thing becomes pointless, I feel. (Ok, so
it may have been pointless before too, but at least before this patch
it generated special code, now it doesn't). So why carry it along at
all?
So I suppose this boils down to if: XCHG ends up being cheaper than
MOV+FENCE.