| 1 |
What: /sys/kernel/mm/mempolicy/weighted_interleave/ |
| 2 |
Date: January 2024 |
| 3 |
Contact: Linux memory management mailing list <[email protected]> |
| 4 |
Description: Configuration Interface for the Weighted Interleave policy |
| 5 |
|
| 6 |
What: /sys/kernel/mm/mempolicy/weighted_interleave/nodeN |
| 7 |
Date: January 2024 |
| 8 |
Contact: Linux memory management mailing list <[email protected]> |
| 9 |
Description: Weight configuration interface for nodeN |
| 10 |
|
| 11 |
The interleave weight for a memory node (N). These weights are |
| 12 |
utilized by tasks which have set their mempolicy to |
| 13 |
MPOL_WEIGHTED_INTERLEAVE. |
| 14 |
|
| 15 |
These weights only affect new allocations, and changes at runtime |
| 16 |
will not cause migrations on already allocated pages. |
| 17 |
|
| 18 |
The minimum weight for a node is always 1. |
| 19 |
|
| 20 |
Minimum weight: 1 |
| 21 |
Maximum weight: 255 |
| 22 |
|
| 23 |
Writing invalid values (i.e. any values not in [1,255], |
| 24 |
empty string, ...) will return -EINVAL. |
| 25 |
|
| 26 |
Changing the weight to a valid value will automatically |
| 27 |
switch the system to manual mode as well. |
| 28 |
|
| 29 |
What: /sys/kernel/mm/mempolicy/weighted_interleave/auto |
| 30 |
Date: May 2025 |
| 31 |
Contact: Linux memory management mailing list <[email protected]> |
| 32 |
Description: Auto-weighting configuration interface |
| 33 |
|
| 34 |
Configuration mode for weighted interleave. 'true' indicates |
| 35 |
that the system is in auto mode, and a 'false' indicates that |
| 36 |
the system is in manual mode. |
| 37 |
|
| 38 |
In auto mode, all node weights are re-calculated and overwritten |
| 39 |
(visible via the nodeN interfaces) whenever new bandwidth data |
| 40 |
is made available during either boot or hotplug events. |
| 41 |
|
| 42 |
In manual mode, node weights can only be updated by the user. |
| 43 |
Note that nodes that are onlined with previously set weights |
| 44 |
will reuse those weights. If they were not previously set or |
| 45 |
are onlined with missing bandwidth data, the weights will use |
| 46 |
a default weight of 1. |
| 47 |
|
| 48 |
Writing any true value string (e.g. Y or 1) will enable auto |
| 49 |
mode, while writing any false value string (e.g. N or 0) will |
| 50 |
enable manual mode. All other strings are ignored and will |
| 51 |
return -EINVAL. |
| 52 |
|
| 53 |
Writing a new weight to a node directly via the nodeN interface |
| 54 |
will also automatically switch the system to manual mode. |