[PATCH] futex: Optimise the size check get_futex_key()
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Thu Jul 2 03:56:15 PDT 2026
On 2026-07-02 10:59:21 [+0200], Peter Zijlstra wrote:
> > Could someone verify this, please? The 5% look a bit high. This is on
> > top of the series (but not worsen by the series).
>
> Bah, I tried to reproduce and couldn't. Then I noticed I did a clang
> build and that is in fact clever enough to do this optimization itself.
>
> /me tries again with a GCC build.
>
> pre: [thread 0] futex: 0x561f14430680 [ 9021408 ops/sec ]
> post: [thread 0] futex: 0x55feadbbb680 [ 8977527 ops/sec ]
>
> (and this seems to be well inside the error threshold of this test).
>
> So I see the GCC build do the DIV, and no longer with his patch applied,
> but for some reason I cannot get the runtime performance to actually
> improve much of anything on my system.
I did open https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126078 for the
div.
My .config is the debian distro on the 4 node big iron. [ in case it
it has so much overhead elsewhere that this place a bigger role].
"perf top" showed this as 6% or something and red in the function. After
the removal it did not show up.
Sebastian
More information about the linux-arm-kernel
mailing list