History

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]

Peter Zijlstra committed 1 year ago

Commit c042c501 parent cec199c5 files · +115 −18Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/futex.h+1−1
@@ -63,7 +63,7 @@ · 62 unmodified lines
6363 #define FUTEX2_SIZE_U32 0x02
6464 #define FUTEX2_SIZE_U64 0x03
6565 #define FUTEX2_NUMA 0x04
66− /* 0x08 */
66+#define FUTEX2_MPOL 0x08
6767 /* 0x10 */
6868 /* 0x20 */
6969 /* 0x40 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t