Re: [PATCH] futex: Optimise the size check get_futex_key()
Sebastian Andrzej Siewior <[email protected]>
| Newsgroups | org.kernel.vger.linux-arch,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
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