lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 2/9] mm/demotion: Expose per node memory tier to sysfs
From
Date
On Fri, 2022-06-03 at 19:12 +0530, Aneesh Kumar K.V wrote:
>
>
> +static struct memory_tier *__node_get_memory_tier(int node)
> +{
> + struct memory_tier *memtier;
> +
> + list_for_each_entry(memtier, &memory_tiers, list) {

We could need to map node to mem_tier quite often, if we need
to account memory usage at tier level. It will be more efficient
to have a pointer from node (pgdat) to memtier rather
than doing a search through the list.


> + if (node_isset(node, memtier->nodelist))
> + return memtier;
> + }
> + return NULL;
> +}
> +
>

Tim

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