lkml.org 
[lkml]   [2023]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 2/2] mm: memory_hotplug: drop memoryless node from fallback lists
From
Hi Ingo,

On 2023/10/20 16:32, Ingo Molnar wrote:
>
> * Qi Zheng <zhengqi.arch@bytedance.com> wrote:
>
>> In offline_pages(), if a node becomes memoryless, we
>> will clear its N_MEMORY state by calling node_states_clear_node().
>> But we do this after rebuilding the zonelists by calling
>> build_all_zonelists(), which will cause this memoryless node to
>> still be in the fallback list of other nodes. This will incur
>> some runtime overhead.
>>
>> To drop memoryless node from fallback lists in this case, just
>> call node_states_clear_node() before calling build_all_zonelists().
>
> s/memoryless node
> /memoryless nodes

Will do.

>
>>
>> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
>> Acked-by: David Hildenbrand <david@redhat.com>
>> ---
>> mm/memory_hotplug.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
>> index d4a364fdaf8f..f019f7d6272c 100644
>> --- a/mm/memory_hotplug.c
>> +++ b/mm/memory_hotplug.c
>> @@ -2036,12 +2036,16 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages,
>> /* reinitialise watermarks and update pcp limits */
>> init_per_zone_wmark_min();
>>
>> + /*
>> + * Make sure to mark the node as memory-less before rebuilding the zone
>> + * list. Otherwise this node would still appear in the fallback lists.
>> + */
>> + node_states_clear_node(node, &arg);
>
> Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks.

>
> Thanks,
>
> Ingo

\
 
 \ /
  Last update: 2023-10-20 11:14    [W:0.105 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site