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]
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -63,7 +63,7 @@ · 62 unmodified lines | |||
| 63 | #define FUTEX2_SIZE_U32 0x02 | 63 | #define FUTEX2_SIZE_U32 0x02 |
| 64 | #define FUTEX2_SIZE_U64 0x03 | 64 | #define FUTEX2_SIZE_U64 0x03 |
| 65 | #define FUTEX2_NUMA 0x04 | 65 | #define FUTEX2_NUMA 0x04 |
| 66 | /* 0x08 */ | 66 | #define FUTEX2_MPOL 0x08 |
| 67 | /* 0x10 */ | 67 | /* 0x10 */ |
| 68 | /* 0x20 */ | 68 | /* 0x20 */ |
| 69 | /* 0x40 */ | 69 | /* 0x40 */ |