Re: RFC: Memory Tiering Kernel Interfaces
From: Dave Hansen
Date: Mon May 02 2022 - 11:22:13 EST
> The current memory tiering interface needs to be improved to address
> several important use cases:
FWIW, I totally agree. We knew when that code went in that the default
ordering was feeble. There were patches to export the demotion order
and allow it to be modified from userspace, but they were jettisoned at
some point.
> Memory tiering hierarchy is rebuilt upon hot-add or hot-remove of a
> memory node, but is NOT rebuilt upon hot-add or hot-remove of a CPU
> node.
Yeah, this would be a welcome improvement if we can get there.
> * /sys/devices/system/node/memory_tiers
>
> Format: node list (one tier per line, in the tier order)
>
> When read, list memory nodes by tiers.
Nit: this would seems to violate the one-value-per-file sysfs guideline.
It can be fixed by making tiers actual objects, which would have some
other nice benefits too.