diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2025-04-16 19:29:17 +0300 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-05-03 13:02:09 +0300 |
| commit | c042c505210dc3453f378df432c10fff3d471bc5 (patch) | |
| tree | 1d3ef6d9a73ec25e9ba97684717e60aaba4fdff4 /include/uapi/linux | |
| parent | cec199c5e39bde7191a08087cc3d002ccfab31ff (diff) | |
| download | linux-c042c505210dc3453f378df432c10fff3d471bc5.tar.xz | |
futex: Implement FUTEX2_MPOL
Extend the futex2 interface to be aware of mempolicy.
When FUTEX2_MPOL is specified and there is a MPOL_PREFERRED or
home_node specified covering the futex address, use that hash-map.
Notably, in this case the futex will go to the global node hashtable,
even if it is a PRIVATE futex.
When FUTEX2_NUMA|FUTEX2_MPOL is specified and the user specified node
value is FUTEX_NO_NODE, the MPOL lookup (as described above) will be
tried first before reverting to setting node to the local node.
[bigeasy: add CONFIG_FUTEX_MPOL, add MPOL to FUTEX2_VALID_MASK, write
the node only to user if FUTEX_NO_NODE was supplied]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250416162921.513656-18-bigeasy@linutronix.de
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/futex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h index 6b94da467e70..7e2744ec8933 100644 --- a/include/uapi/linux/futex.h +++ b/include/uapi/linux/futex.h @@ -63,7 +63,7 @@ #define FUTEX2_SIZE_U32 0x02 #define FUTEX2_SIZE_U64 0x03 #define FUTEX2_NUMA 0x04 - /* 0x08 */ +#define FUTEX2_MPOL 0x08 /* 0x10 */ /* 0x20 */ /* 0x40 */ |
