From: Byungchul Park <byungchul@sk.com>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: akpm@linux-foundation.org, alexghiti@kernel.org,
kernel-team@meta.com, akinobu.mita@gmail.com, david@kernel.org,
lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
vbabka@kernel.org, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, hannes@cmpxchg.org, zhengqi.arch@bytedance.com,
shakeel.butt@linux.dev, axelrasmussen@google.com,
yuanchu@google.com, weixugc@google.com, gourry@gourry.net,
apopple@nvidia.com, joshua.hahnjy@gmail.com,
matthew.brost@intel.com, rakie.kim@sk.com,
ying.huang@linux.alibaba.com, ziy@nvidia.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, kernel_team@skhynix.com
Subject: Re: [PATCH 2/4] mm: Rename node_get_allowed_targets() to make it more explicit
Date: Thu, 12 Mar 2026 14:28:31 +0900 [thread overview]
Message-ID: <20260312052831.GA60352@system.software.com> (raw)
In-Reply-To: <20260311110314.237315-3-alex@ghiti.fr>
On Wed, Mar 11, 2026 at 12:02:41PM +0100, Alexandre Ghiti wrote:
> This function actually returns the tier nodes that are targeted during a
> demotion, so rename it to be more explicit.
>
> No functional change intended.
>
> Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
> ---
> include/linux/memory-tiers.h | 6 +++---
> mm/memory-tiers.c | 4 ++--
> mm/vmscan.c | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/memory-tiers.h b/include/linux/memory-tiers.h
> index 0bf0d002939e..ec39dc3c39e6 100644
> --- a/include/linux/memory-tiers.h
> +++ b/include/linux/memory-tiers.h
> @@ -54,7 +54,7 @@ struct memory_dev_type *mt_find_alloc_memory_type(int adist,
> void mt_put_memory_types(struct list_head *memory_types);
> #ifdef CONFIG_MIGRATION
> int next_demotion_node(int node, const nodemask_t *allowed_mask);
> -void node_get_allowed_targets(pg_data_t *pgdat, nodemask_t *targets);
> +void node_get_allowed_demotion_targets(pg_data_t *pgdat, nodemask_t *targets);
Look better than before to me.
What about just node_get_demotion_targets()?
Byungchul
> bool node_is_toptier(int node);
> unsigned int mt_demote_folios(struct list_head *demote_folios,
> struct pglist_data *pgdat,
> @@ -65,7 +65,7 @@ static inline int next_demotion_node(int node, const nodemask_t *allowed_mask)
> return NUMA_NO_NODE;
> }
>
> -static inline void node_get_allowed_targets(pg_data_t *pgdat, nodemask_t *targets)
> +static inline void node_get_allowed_demotion_targets(pg_data_t *pgdat, nodemask_t *targets)
> {
> *targets = NODE_MASK_NONE;
> }
> @@ -117,7 +117,7 @@ static inline int next_demotion_node(int node, const nodemask_t *allowed_mask)
> return NUMA_NO_NODE;
> }
>
> -static inline void node_get_allowed_targets(pg_data_t *pgdat, nodemask_t *targets)
> +static inline void node_get_allowed_demotion_targets(pg_data_t *pgdat, nodemask_t *targets)
> {
> *targets = NODE_MASK_NONE;
> }
> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
> index afdf21738a54..19ecc9b6bbda 100644
> --- a/mm/memory-tiers.c
> +++ b/mm/memory-tiers.c
> @@ -300,7 +300,7 @@ bool node_is_toptier(int node)
> return toptier;
> }
>
> -void node_get_allowed_targets(pg_data_t *pgdat, nodemask_t *targets)
> +void node_get_allowed_demotion_targets(pg_data_t *pgdat, nodemask_t *targets)
> {
> struct memory_tier *memtier;
>
> @@ -428,7 +428,7 @@ unsigned int mt_demote_folios(struct list_head *demote_folios,
> if (list_empty(demote_folios))
> return 0;
>
> - node_get_allowed_targets(pgdat, &allowed_mask);
> + node_get_allowed_demotion_targets(pgdat, &allowed_mask);
> mem_cgroup_node_filter_allowed(memcg, &allowed_mask);
> if (nodes_empty(allowed_mask))
> return 0;
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 5e0138b94480..11a97ee8f583 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -351,7 +351,7 @@ static bool can_demote(int nid, struct scan_control *sc,
> if (sc && sc->no_demotion)
> return false;
>
> - node_get_allowed_targets(pgdat, &allowed_mask);
> + node_get_allowed_demotion_targets(pgdat, &allowed_mask);
> if (nodes_empty(allowed_mask))
> return false;
>
> --
> 2.53.0
next prev parent reply other threads:[~2026-03-12 5:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 11:02 [PATCH 0/4] Demotion cleanup and fixes Alexandre Ghiti
2026-03-11 11:02 ` [PATCH 1/4] mm: Move demotion related functions in memory-tiers.c Alexandre Ghiti
2026-03-11 14:55 ` Joshua Hahn
2026-03-13 13:33 ` Alexandre Ghiti
2026-03-12 8:44 ` Donet Tom
2026-03-13 13:27 ` Alexandre Ghiti
2026-03-12 12:56 ` David Hildenbrand (Arm)
2026-03-13 13:45 ` Alexandre Ghiti
2026-03-11 11:02 ` [PATCH 2/4] mm: Rename node_get_allowed_targets() to make it more explicit Alexandre Ghiti
2026-03-11 15:02 ` Joshua Hahn
2026-03-12 5:28 ` Byungchul Park [this message]
2026-03-12 12:58 ` David Hildenbrand (Arm)
2026-03-13 13:46 ` Alexandre Ghiti
2026-03-12 8:46 ` Donet Tom
2026-03-11 11:02 ` [PATCH 3/4] mm: Fix demotion gfp by clearing GFP_RECLAIM after setting GFP_TRANSHUGE Alexandre Ghiti
2026-03-11 17:06 ` Andrew Morton
2026-03-12 12:59 ` David Hildenbrand (Arm)
2026-03-13 13:47 ` Alexandre Ghiti
2026-03-11 17:54 ` Johannes Weiner
2026-03-12 16:01 ` Gregory Price
2026-03-13 13:49 ` Alexandre Ghiti
2026-03-11 11:02 ` [PATCH 4/4] mm: Fix demotion gfp by preserving initial gfp reclaim policy Alexandre Ghiti
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=20260312052831.GA60352@system.software.com \
--to=byungchul@sk.com \
--cc=Liam.Howlett@oracle.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=alexghiti@kernel.org \
--cc=apopple@nvidia.com \
--cc=axelrasmussen@google.com \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=hannes@cmpxchg.org \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=kernel_team@skhynix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=matthew.brost@intel.com \
--cc=mhocko@suse.com \
--cc=rakie.kim@sk.com \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=ying.huang@linux.alibaba.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.com \
--cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox