lkml.org 
[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: RFC: Memory Tiering Kernel Interfaces (v2)
From
Date
On Wed, 2022-05-11 at 23:22 -0700, Wei Xu wrote:
> Sysfs Interfaces
> ================
>
> * /sys/devices/system/memtier/memtierN/nodelist
>
>   where N = 0, 1, 2 (the kernel supports only 3 tiers for now).
>
>   Format: node_list
>
>   Read-only. When read, list the memory nodes in the specified tier.
>
>   Tier 0 is the highest tier, while tier 2 is the lowest tier.
>
>   The absolute value of a tier id number has no specific meaning.
>   What matters is the relative order of the tier id numbers.
>
>   When a memory tier has no nodes, the kernel can hide its memtier
>   sysfs files.
>
> * /sys/devices/system/node/nodeN/memtier
>
>   where N = 0, 1, ...
>
>   Format: int or empty
>
>   When read, list the memory tier that the node belongs to. Its value
>   is empty for a CPU-only NUMA node.
>
>   When written, the kernel moves the node into the specified memory
>   tier if the move is allowed. The tier assignment of all other nodes
>   are not affected.
>
>   Initially, we can make this interface read-only.

It seems that "/sys/devices/system/node/nodeN/memtier" has all
information we needed. Do we really need
"/sys/devices/system/memtier/memtierN/nodelist"?

That can be gotten via a simple shell command line,

$ grep . /sys/devices/system/node/nodeN/memtier | sort -n -k 2 -t ':'

Best Regards,
Huang, Ying

\
 
 \ /
  Last update: 2022-05-12 09:04    [W:0.201 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site