lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 1/2] mm/demotion: Expose memory type details via sysfs
Date
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:

> This patch adds /sys/devices/virtual/memtier/ where all memory tier related
> details can be found. All allocated memory types will be listed there as
> /sys/devices/virtual/memtier/memtypeN/

Another choice is to make memory types and memory tiers system devices.
That is,

/sys/devices/system/memory_type/memory_typeN
/sys/devices/system/memory_tier/memory_tierN

That looks more natural to me. Because we already have "node" and
"memory" devices there. Why don't you put memory types and memory tiers
there?

And, I think we shouldn't put "memory_type" in the "memory_tier"
directory. "memory_type" isn't a part of "memory_tier".

> The nodes which are part of a specific memory type can be listed via
> /sys/devices/system/memtier/memtypeN/nodes.

How about create links to /sys/devices/system/node/nodeN in
"memory_type". But I'm OK to have "nodes" file too.

> The adistance value of a specific memory type can be listed via
> /sys/devices/system/memtier/memtypeN/adistance.
>
> A directory listing looks like:
> :/sys/devices/virtual/memtier# tree memtype1
> memtype1
> ├── adistance

Why not just use "abstract_distance"? This is user space interface,
it's better to be intuitive.

> ├── nodes
> ├── subsystem -> ../../../../bus/memtier
> └── uevent
>
> Since we will be using struct device to expose details via sysfs, drop struct
> kref and use struct device for refcounting the memtype.
>

Best Regards,
Huang, Ying

\
 
 \ /
  Last update: 2022-08-26 03:52    [W:0.092 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site