forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proc: Add a new isolated /proc/pid/mempolicy type.
/proc/pid/mempolicy can be used to check and adjust the userspace task's mempolicy dynamically.In many case, the application and the control plane are two separate systems. When the application is created, it doesn't know how to use memory, and it doesn't care. The control plane will decide the memory usage policy based on different reasons.In that case, we can dynamically adjust the mempolicy using /proc/pid/mempolicy interface. Format of input: ---------------- <mode>[=<flags>][:<nodelist>] Example ------- set mempolicy: $ echo "interleave=static:0-3" > /proc/27036/mempolicy $ cat /proc/27036/mempolicy interleave=static:0-3 remove mempolicy: + $ echo "default" > /proc/27036/mempolicy The following 6 mempolicy mode types: "default" "prefer" "bind" "interleave" "local" "prefer (many)" The supported mode flags are: "static" "relative" nodelist For example:0-3 or 0,1,2,3 Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
- Loading branch information
1 parent
0cffc98
commit ac5c3a8
Showing
6 changed files
with
172 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters