From nobody Tue Apr 7 23:43:01 2026 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75A823D6CAF for ; Wed, 11 Mar 2026 11:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773227041; cv=none; b=UbnuRceS6zZ6qsMMLE6PkNOQCLAEXKXRoCs1yIKO7NziI9p9SAKk9B1q/mD0A3G5b3zvMlyrjm0OZavR4/kYG/xvH/y0OY4EZrJlI5I3wMZ5fUP+5iS5uNLOMch4qtzyKsrB9G6dwX3PyYudAIEkX3lDfuGiHrnrER7XJwjm4UU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773227041; c=relaxed/simple; bh=AUR35bXv3yqO58cr+skSXzWxak3+d4HJaklN/PpmF+s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a/Z+x1m9IOCg4hpYrhb0MvjboUr9UXezUrE0JTQ8CY5iFTpr1qroMm7zc1PzYolfwgAeT223ocj7o36Mznk6eaI57AnKwZwMhIU7T+hF2kUZuYs5TDPMO1TDHGpVQ3uFS5CyYZq7god/QT3lbwLPkzAMhcwXcX9jyxYZGTduxv0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 26B45432F5; Wed, 11 Mar 2026 11:03:49 +0000 (UTC) From: Alexandre Ghiti To: akpm@linux-foundation.org Cc: 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, byungchul@sk.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, Alexandre Ghiti Subject: [PATCH 2/4] mm: Rename node_get_allowed_targets() to make it more explicit Date: Wed, 11 Mar 2026 12:02:41 +0100 Message-ID: <20260311110314.237315-3-alex@ghiti.fr> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260311110314.237315-1-alex@ghiti.fr> References: <20260311110314.237315-1-alex@ghiti.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: alex@ghiti.fr X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkeefjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlvgigrghnughrvgcuifhhihhtihcuoegrlhgvgiesghhhihhtihdrfhhrqeenucggtffrrghtthgvrhhnpefhjeejtdelteefuedvffduheeifeeggeefudevfefhleduvdeutdeiteeukeegveenucfkphepvdeivddtmedutdgumegttdelvdemgedttdemmeehmeefrgeivgenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedviedvtdemuddtugemtgdtledvmeegtddtmeemheemfegriegvpdhhvghloheprghlvgigghhhihhtihdqfhgvughorhgrqdfrhfegofekiedvrfdrthhhvghfrggtvggsohhokhdrtghomhdpmhgrihhlfhhrohhmpegrlhgvgiesghhhihhtihdrfhhrpdhqihgupedvieeugeehgeefvdfhhedpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopedvkedprhgtphhtthhopegrkhhpmheslhhinhhugidqfhhouhhnuggrthhiohhnrdhorhhgpdhrtghpthhtoheprghlvgigghhhihhtiheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepkhgvrhhnvghlqdhtvggrmhesmhgvthgrrdgtohhmpdhrtghpthhtoheprghkihhnohgsuhhmihhtr gesghhmrghilhdrtghomhdprhgtphhtthhopegurghvihgusehkvghrnhgvlhdrohhrghdprhgtphhtthhopehlohhrvghniihordhsthhorghkvghssehorhgrtghlvgdrtghomh X-GND-State: clean Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Joshua Hahn --- 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 adi= st, 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 *targe= ts); 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 node= mask_t *allowed_mask) return NUMA_NO_NODE; } =20 -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, nod= emask_t *targets) { *targets =3D NODE_MASK_NONE; } @@ -117,7 +117,7 @@ static inline int next_demotion_node(int node, const no= demask_t *allowed_mask) return NUMA_NO_NODE; } =20 -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, nod= emask_t *targets) { *targets =3D 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; } =20 -void node_get_allowed_targets(pg_data_t *pgdat, nodemask_t *targets) +void node_get_allowed_demotion_targets(pg_data_t *pgdat, nodemask_t *targe= ts) { struct memory_tier *memtier; =20 @@ -428,7 +428,7 @@ unsigned int mt_demote_folios(struct list_head *demote_= folios, if (list_empty(demote_folios)) return 0; =20 - 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; =20 - node_get_allowed_targets(pgdat, &allowed_mask); + node_get_allowed_demotion_targets(pgdat, &allowed_mask); if (nodes_empty(allowed_mask)) return false; =20 --=20 2.53.0