Re: [PATCH 2/3] futex: Use RCU-based per-CPU reference counting instead of rcuref_t
From: Sebastian Andrzej Siewior
Date: Tue Jul 08 2025 - 02:55:00 EST
On 2025-07-07 16:36:22 [+0200], To linux-kernel@xxxxxxxxxxxxxxx wrote:
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>
> The use of rcuref_t for reference counting introduces a performance bottleneck
> when accessed concurrently by multiple threads during futex operations.
just folded this bit after kernel test robot complained:
diff --git a/include/linux/futex.h b/include/linux/futex.h
index cd773febd497b..9e9750f049805 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -113,7 +113,7 @@ static inline int futex_hash_allocate_default(void)
return 0;
}
static inline int futex_hash_free(struct mm_struct *mm) { return 0; }
-static inline void futex_mm_init(struct mm_struct *mm) { }
+static inline int futex_mm_init(struct mm_struct *mm) { return 0; }
#endif
Sebastian