lkml.org 
[lkml]   [2021]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 03/15] mm: memcontrol: remove the pgdata parameter of mem_cgroup_page_lruvec
On Tue, Mar 30, 2021 at 06:15:19PM +0800, Muchun Song wrote:
> All the callers of mem_cgroup_page_lruvec() just pass page_pgdat(page)
> as the 2nd parameter to it (except isolate_migratepages_block()). But
> for isolate_migratepages_block(), the page_pgdat(page) is also equal
> to the local variable of @pgdat. So mem_cgroup_page_lruvec() do not
> need the pgdat parameter. Just remove it to simplify the code.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>

There is a minor benefit in not doing the page_pgdat() lookup twice.
But I think it only really matters on 32-bit NUMA, where we have more
than one node but not enough space in page->flags to store the nid,
and so page_to_nid() is out-of-line and needs to go through section.

Those setups aren't really around anymore, and certainly don't justify
the hassle (and potential bugs) of the awkward interface.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

\
 
 \ /
  Last update: 2021-04-02 17:22    [W:0.506 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site