forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
sysfs: add /sys/kernel/mm/numa/demotion_list
Current demotion algorithm was designed with DRAM->PMEM case in mind.
This is not the only possible path for migration. In general case,
it's hard to figure out all possible scenarios.
It would be interesting to try different demotion paths depending on
workload at run-tume. Imagine a hosting buseness and a configuration
with one fast CPU node, one slow CPU node, one fast pmem and one slow
pmem. Depending on desired performance characteristics, the demotion
paths may look like this:
1. fast cpu -> fast pmem -> swap
2. slow cpu -> slow pmem -> swap
Or like this:
1. fast cpu -> fast pmem -> slow pmem -> swap
2. slow cpu -> slow pmem -> swap
Or like this:
1. fast cpu -> fast pmem -> slow pmem -> swap
2. slow cpu -> swap
Or like this:
fast cpu -> slow cpu -> fast pmem -> slow pmem -> swap
This is clearly a tradeoff depending on desired performance. It may
get changed next morning, and it will require node chain adjustments,
preferably without stopping the machine and rebuilding the kernel.
The most robust solution I can figure out is an hierarchy of demotion
settings:
1. Device tree record;
2. cmdline parameter;
3. Current automatic approach with the absence of 1 and 2;
4. Direct access to demotion chain using sysfs.
This patch implements (4).
Another interesting option is to use demotion_list to allocate memory
in case of MPOL_PREFERRED{_MANY}. It would be great to discuss all
alternatives.
Signed-off-by: Yury Norov <yury.norov@gmail.com>- Loading branch information
Showing
3 changed files
with
101 additions
and
1 deletion.
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