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