[PATCH 0/3] futex: Use RCU-based per-CPU reference counting

Sebastian Andrzej Siewior posted 3 patches 3 months ago
There is a newer version of this series
include/linux/futex.h                         |  14 +-
include/linux/mm_types.h                      |   5 +
init/Kconfig                                  |   4 -
kernel/fork.c                                 |   6 +-
kernel/futex/core.c                           | 239 ++++++++++++++++--
kernel/futex/futex.h                          |   2 -
.../futex/functional/futex_priv_hash.c        |  42 ++-
7 files changed, 276 insertions(+), 36 deletions(-)
[PATCH 0/3] futex: Use RCU-based per-CPU reference counting
Posted by Sebastian Andrzej Siewior 3 months ago
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.

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?

Sebastian

--------

Peter Zijlstra (1):
  futex: Use RCU-based per-CPU reference counting instead of rcuref_t

Sebastian Andrzej Siewior (2):
  selftests/futex: Adapt the private hash test to RCU related changes
  futex: Make futex_private_hash_get() static

 include/linux/futex.h                         |  14 +-
 include/linux/mm_types.h                      |   5 +
 init/Kconfig                                  |   4 -
 kernel/fork.c                                 |   6 +-
 kernel/futex/core.c                           | 239 ++++++++++++++++--
 kernel/futex/futex.h                          |   2 -
 .../futex/functional/futex_priv_hash.c        |  42 ++-
 7 files changed, 276 insertions(+), 36 deletions(-)

-- 
2.50.0
Re: [PATCH 0/3] futex: Use RCU-based per-CPU reference counting
Posted by Peter Zijlstra 3 months ago
On Mon, Jul 07, 2025 at 04:36:20PM +0200, Sebastian Andrzej Siewior wrote:
> Since it was not yet released, should we rip out the IMMUTABLE bits and
> just stick with GET/SET slots?

I suppose that makes sense. If someone ever comes up with another
use-case for it we can always add it back in.
Re: [PATCH 0/3] futex: Use RCU-based per-CPU reference counting
Posted by Sebastian Andrzej Siewior 3 months ago
On 2025-07-08 09:50:25 [+0200], Peter Zijlstra wrote:
> On Mon, Jul 07, 2025 at 04:36:20PM +0200, Sebastian Andrzej Siewior wrote:
> > Since it was not yet released, should we rip out the IMMUTABLE bits and
> > just stick with GET/SET slots?
> 
> I suppose that makes sense. If someone ever comes up with another
> use-case for it we can always add it back in.

I add a follow-up patch to rip it out and update the docs.
_One_ time we have the docs in time and then…

Sebastian