Re: [PATCH v5 8/8] futex: Use runtime constants for __futex_hash() hot path

From: Charlie Jenkins

Date: Fri Jul 10 2026 - 03:55:34 EST


On Tue, 30 Jun 2026 04:55:31 +0000, K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
> Runtime constify the read-only after init data __futex_shift(shift_32),
> __futex_mask(mask_32), and __futex_queues(ptr) used in __futex_hash()
> hot path to avoid referencing global variable.
>
> This also allows __futex_queues to be allocated dynamically to
> "nr_node_ids" slots instead of reserving config dependent MAX_NUMNODES
> (1 << CONFIG_NODES_SHIFT) worth of slots upfront.
>
> [...]

Reviewed-by: Charlie Jenkins <thecharlesjenkins@xxxxxxxxx>
Tested-by: Charlie Jenkins <thecharlesjenkins@xxxxxxxxx>

--
- Charlie