All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Ying Huang <ying.huang@intel.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	linux-mm@kvack.org, Wei Xu <weixugc@google.com>,
	mhocko@kernel.org, akpm@linux-foundation.org,
	rientjes@google.com, yosryahmed@google.com, hannes@cmpxchg.org,
	shakeelb@google.com, dave.hansen@linux.intel.com,
	tim.c.chen@linux.intel.com, roman.gushchin@linux.dev,
	gthelen@google.com, a.manzanares@samsung.com,
	heekwon.p@samsung.com, gim.jongmin@samsung.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] mm/vmscan: use node_is_toptier helper in node_reclaim
Date: Wed, 1 Jun 2022 07:00:41 -0700	[thread overview]
Message-ID: <20220601140041.wjszzmkswy4dkn4n@offworld> (raw)
In-Reply-To: <61c47f98b4c0be1d5da5e097779412f9edd70753.camel@intel.com>

On Wed, 01 Jun 2022, Ying Huang wrote:

>On Tue, 2022-05-31 at 17:20 +0530, Aneesh Kumar K.V wrote:
>> Davidlohr Bueso <dave@stgolabs.net> writes:
>>
>> > We have helpers for a reason.
>> >
>> > Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
>> > ---
>> >  mm/vmscan.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/mm/vmscan.c b/mm/vmscan.c
>> > index 1678802e03e7..cb583fcbf5bf 100644
>> > --- a/mm/vmscan.c
>> > +++ b/mm/vmscan.c
>> > @@ -4750,7 +4750,7 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order)
>> >  	 * over remote processors and spread off node memory allocations
>> >  	 * as wide as possible.
>> >  	 */
>> > -	if (node_state(pgdat->node_id, N_CPU) && pgdat->node_id != numa_node_id())
>> > +	if (node_is_toptier(pgdat->node_id) && pgdat->node_id != numa_node_id())
>> >  		return NODE_RECLAIM_NOSCAN;
>> >
>> >
>> >  	if (test_and_set_bit(PGDAT_RECLAIM_LOCKED, &pgdat->flags))
>>
>>
>> Are we really looking at the top tier in a tiered memory hierarchy here?
>> The comment seems to suggest we are looking at local NUMA node?
>
>The code change itself is correct.  But it is an implementation details
>that node_is_toptier() == node_state(, N_CPU).  And after we supporting
>more memory tiers (like GPU, HBM), we will change the implementation of
>node_is_toptier() soon.   So I think that it's better to keep the
>original code.

Agreed.

Thanks,
Davidlohr

  reply	other threads:[~2022-06-01 14:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16  5:38 [PATCH RFC lsfmm 0/6] mm: proactive reclaim and memory tiering topics Davidlohr Bueso
2022-04-16  5:38 ` [PATCH 1/6] drivers/base/node: cleanup register_node() Davidlohr Bueso
2022-04-25 22:30   ` Adam Manzanares
2022-05-03 18:17   ` David Hildenbrand
2022-05-04  4:33   ` David Rientjes
2022-04-16  5:38 ` [PATCH 2/6] mm/vmscan: use node_is_toptier helper in node_reclaim Davidlohr Bueso
2022-04-25 22:32   ` Adam Manzanares
2022-05-04  4:33   ` David Rientjes
2022-05-04  7:26   ` Jagdish Gediya
2022-05-31 11:50   ` Aneesh Kumar K.V
2022-06-01  6:12     ` Ying Huang
2022-06-01 14:00       ` Davidlohr Bueso [this message]
2022-04-16  5:38 ` [PATCH 3/6] mm: make __node_reclaim() more flexible Davidlohr Bueso
2022-04-16  5:39 ` [PATCH 4/6] mm: introduce per-node proactive reclaim interface Davidlohr Bueso
2022-04-19  0:00   ` Tim Chen
2022-04-16  5:39 ` [PATCH 5/6] mm/migration: export demotion_path of a node via sysfs Davidlohr Bueso
2022-04-22 17:31   ` Yang Shi
2022-04-22 17:33     ` Yang Shi
2022-04-22 17:50       ` Davidlohr Bueso
2022-04-17  3:49 ` [PATCH 6/6] mm/migrate: export whether or not node is toptier in sysf Davidlohr Bueso
2022-04-18 15:34   ` Dave Hansen
2022-04-18 16:45     ` Davidlohr Bueso
2022-04-18 16:50       ` Dave Hansen
2022-04-18 17:01         ` Davidlohr Bueso
2022-04-22 17:37   ` Yang Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220601140041.wjszzmkswy4dkn4n@offworld \
    --to=dave@stgolabs.net \
    --cc=a.manzanares@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gim.jongmin@samsung.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=heekwon.p@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeelb@google.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=weixugc@google.com \
    --cc=ying.huang@intel.com \
    --cc=yosryahmed@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.