Re: [PATCH v2 2/2] mm/mm_init.c: remove reset_node_present_pages()

From: David Hildenbrand
Date: Wed Jun 07 2023 - 07:39:47 EST


On 07.06.23 04:50, Haifeng Xu wrote:
reset_node_present_pages() only get called in hotadd_init_pgdat(), move
the action that clear present pages to free_area_init_core_hotplug(), so
the helper can be removed.

Signed-off-by: Haifeng Xu <haifeng.xu@xxxxxxxxxx>
Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
---
v2:
- declare 'struct zone' within the for loop
- fix comment layout
---
mm/memory_hotplug.c | 18 ------------------
mm/mm_init.c | 15 +++++++++++++--
2 files changed, 13 insertions(+), 20 deletions(-)

As Michal said, we could be clearer that this simplifies the code (and removes a TODO).

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb