From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>
Cc: "André Almeida" <andrealmeid@igalia.com>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"Ingo Molnar" <mingo@redhat.com>,
"Juri Lelli" <juri.lelli@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
linux-kernel@vger.kernel.org,
"Valentin Schneider" <vschneid@redhat.com>,
"Waiman Long" <longman@redhat.com>
Subject: Re: [PATCH v2 0/6] futex: Use RCU-based per-CPU reference counting
Date: Tue, 15 Jul 2025 21:29:34 +0530 [thread overview]
Message-ID: <e0f58203-22ef-44c0-9f7b-b15c6007249b@linux.ibm.com> (raw)
In-Reply-To: <20250710110011.384614-1-bigeasy@linutronix.de>
On 7/10/25 16:30, Sebastian Andrzej Siewior wrote:
> I picked up PeterZ futex patch from
> https://lore.kernel.org/all/20250624190118.GB1490279@noisy.programming.kicks-ass.net/
>
> and I am posting it here it now so it can be staged for v6.17.
>
> This survived a few days on my machine and compile robot reported that
> is passes its tests.
>
> v1…v2 https://lore.kernel.org/all/20250707143623.70325-1-bigeasy@linutronix.de
> - Removed the IMMUTABLE bits
> - There was a race if the application exits while the RCU callback is
> pending. Stuffed with mmget()/ mmput_async().
>
> Changes since its initial posting:
> - A patch description has been added
> - The testuite is "fixed" slightly different and has been split out
> - futex_mm_init() is fixed up.
> - The guard(preempt) has been replaced with guard(rcu) since there is
> no reason to disable preemption.
>
> Since it was not yet released, should we rip out the IMMUTABLE bits and
> just stick with GET/SET slots?
>
> Peter Zijlstra (1):
> futex: Use RCU-based per-CPU reference counting instead of rcuref_t
>
> Sebastian Andrzej Siewior (5):
> selftests/futex: Adapt the private hash test to RCU related changes
> futex: Make futex_private_hash_get() static
> futex: Remove support for IMMUTABLE
> selftests/futex: Remove support for IMMUTABLE
> perf bench futex: Remove support for IMMUTABLE
>
> include/linux/futex.h | 16 +-
> include/linux/mm_types.h | 5 +
> include/linux/sched/mm.h | 2 +-
> include/uapi/linux/prctl.h | 2 -
> init/Kconfig | 4 -
> kernel/fork.c | 8 +-
> kernel/futex/core.c | 281 ++++++++++++++----
> kernel/futex/futex.h | 2 -
> tools/include/uapi/linux/prctl.h | 2 -
> tools/perf/bench/futex-hash.c | 1 -
> tools/perf/bench/futex-lock-pi.c | 1 -
> tools/perf/bench/futex-requeue.c | 1 -
> tools/perf/bench/futex-wake-parallel.c | 1 -
> tools/perf/bench/futex-wake.c | 1 -
> tools/perf/bench/futex.c | 21 +-
> tools/perf/bench/futex.h | 1 -
> .../trace/beauty/include/uapi/linux/prctl.h | 2 -
> .../futex/functional/futex_priv_hash.c | 113 +++----
> 18 files changed, 315 insertions(+), 149 deletions(-)
>
Hi. Sorry for not stumble upon this earlier. Saw these now.
Since perf bench had shown a significant regression last time around, and
for which immutable option was added, gave perf futex a try again.
Below are the results: Ran on 5 core LPAR(VM) on power. perf was compiled from tools/perf.
===========
baseline:
===========
tip/master at
commit 8784fb5fa2e0042fe3b1632d4876e1037b695f56 (HEAD)
Author: Borislav Petkov (AMD) <bp@alien8.de>
./perf bench futex hash
Averaged 1559643 operations/sec (+- 0.09%), total secs = 10
Futex hashing: global hash
schbench -t 64 -r 5 -i 5
current rps: 2629.85
schbench -L -m 4 -M auto -t 64 -n 0 -r 5 -i 5
current rps: 1538674.22
=================
baseline + series
=================
./perf bench futex hash
Averaged 306403 operations/sec (+- 0.29%), total secs = 10 <<< around 1/5th of baseline.
Futex hashing: auto resized to 256 buckets <<< maybe resize doesn't happen fast?
./perf bench futex hash -b 512 <<< Gave 512 buckets,
Averaged 1412543 operations/sec (+- 0.14%), total secs = 10 <<< much better numbers, still off by 8-10%.
Futex hashing: 512 hash buckets
(512 is the number of buckets that baseline would have used, increased the buckets to 8192 for trial)
./perf bench futex hash -b 8192
Averaged 1441627 operations/sec (+- 0.14%), total secs = 10
Futex hashing: 8192 hash buckets
schbench -t 64 -r 5 -i 5
current rps: 2656.85 <<< schbench seems good.
schbench -L -m 4 -M auto -t 64 -n 0 -r 5 -i 5
current rps: 1539273.79
next prev parent reply other threads:[~2025-07-15 16:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 11:00 Sebastian Andrzej Siewior
2025-07-10 11:00 ` [PATCH v2 1/6] selftests/futex: Adapt the private hash test to RCU related changes Sebastian Andrzej Siewior
2025-07-11 18:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-07-10 11:00 ` [PATCH v2 2/6] futex: Use RCU-based per-CPU reference counting instead of rcuref_t Sebastian Andrzej Siewior
2025-07-11 18:33 ` [tip: locking/futex] " tip-bot2 for Peter Zijlstra
2025-08-16 2:38 ` Sean Christopherson
2025-08-26 0:38 ` Sean Christopherson
2025-07-30 12:20 ` [PATCH v2 2/6] " André Draszik
2025-07-30 19:44 ` Thomas Gleixner
2025-08-01 14:59 ` André Draszik
2025-08-02 13:22 ` [tip: locking/urgent] futex: Move futex cleanup to __mmdrop() tip-bot2 for Thomas Gleixner
2025-08-21 17:39 ` Breno Leitao
2025-07-10 11:00 ` [PATCH v2 3/6] futex: Make futex_private_hash_get() static Sebastian Andrzej Siewior
2025-07-11 18:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-07-10 11:00 ` [PATCH v2 4/6] futex: Remove support for IMMUTABLE Sebastian Andrzej Siewior
2025-07-11 18:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-07-10 11:00 ` [PATCH v2 5/6] selftests/futex: " Sebastian Andrzej Siewior
2025-07-11 18:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-07-10 11:00 ` [PATCH v2 6/6] perf bench futex: " Sebastian Andrzej Siewior
2025-07-11 18:33 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-07-15 15:59 ` Shrikanth Hegde [this message]
2025-07-15 16:31 ` [PATCH v2 0/6] futex: Use RCU-based per-CPU reference counting Sebastian Andrzej Siewior
2025-07-15 17:04 ` Shrikanth Hegde
2025-07-16 14:29 ` Peter Zijlstra
2025-07-16 18:21 ` Shrikanth Hegde
2025-11-06 9:29 ` Peter Zijlstra
2025-11-06 11:09 ` Sebastian Andrzej Siewior
2025-11-06 11:23 ` Peter Zijlstra
2025-11-06 20:17 ` Paul E. McKenney
2025-11-06 11:40 ` [tip: locking/urgent] futex: Optimize per-cpu " tip-bot2 for Peter Zijlstra
2025-11-06 15:26 ` Shrikanth Hegde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e0f58203-22ef-44c0-9f7b-b15c6007249b@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=andrealmeid@igalia.com \
--cc=bigeasy@linutronix.de \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®