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

From: Linus Torvalds
Date: Thu Sep 05 2013 - 15:50:48 EST


On Thu, Sep 5, 2013 at 12:45 PM, Luck, Tony <tony.luck@xxxxxxxxx> wrote:
>
> No. I can change the Linux code to say "cmpxchg.rel" here ... but the
> h/w will do exactly the same thing it did when I had "cmpxchg.acq".

Oh, so when you said "So we had to back-pedal and keep the "legacy"
behavior of a full fence", you meant the hardware design itself, not
(as I assumed) the Linux kernel header behavior.

Oh well. Hopefully somebody in hardware learnt how stupid it is to
expose weak memory ordering to software. But probably not.

Ugh. Your four-socket machine certainly should have been able to see
the performance improvements of not spinning.

That said, another thing that strikes me is that you have 32 CPU
threads, and the stupid test-program I sent out had MAX_THREADS set to
16. Did you change that? Becuase if not, then some of the extreme
performance profile might be about how the threads get scheduled on
your machine (HT threads vs full cores etc).

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/