Re: RFC: Memory Tiering Kernel Interfaces

Wei Xu
2022-05-03T07:20:07Z

On Mon, May 2, 2022 at 8:20 AM Dave Hansen <dave.hansen@intel.com> wrote:
>
> > 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.
>

Good point. One tier per file should work as well. It can be even
better to have a separate tier sub-tree.