Re: [PATCH 2/4] mm: Rename node_get_allowed_targets() to make it more explicit

Alexandre Ghiti
2026-03-13T13:46:43Z

Hi David, Byungchul,

On 3/12/26 13:58, David Hildenbrand (Arm) wrote:
> On 3/12/26 06:28, Byungchul Park wrote:
>> 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()?
> +1
>
> Maybe throw in the mt_ prefix and call it
>
> mt_get_node_demotion_targets()
>

I'll do, thanks

Alex