summaryrefslogtreecommitdiff
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorHaifeng Xu <haifeng.xu@shopee.com>2023-06-07 05:45:48 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-06-20 02:19:05 +0300
commita668968f84265e698a122656c433809ab9f023fa (patch)
treeca2354272c2f419083ccaf7fc29c2bd2dcd9c0ba /mm/memory_hotplug.c
parent36ce9d76b0a93bae799e27e4f5ac35478c676592 (diff)
downloadlinux-a668968f84265e698a122656c433809ab9f023fa.tar.xz
mm/memory_hotplug: remove reset_node_managed_pages() in hotadd_init_pgdat()
managed pages has already been set to 0 in free_area_init_core_hotplug(), via zone_init_internals() on each zone. It's pointless to reset again. Furthermore, reset_node_managed_pages() no longer needs to be exposed outside of mm/memblock.c. Remove declaration in include/linux/memblock.h and define it as static. In addtion to this, the only caller of reset_node_managed_pages() is reset_all_zones_managed_pages(), which is annotated with __init, so it should be safe to also mark reset_node_managed_pages() as __init. Link: https://lkml.kernel.org/r/20230607024548.1240-1-haifeng.xu@shopee.com Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com> Suggested-by: David Hildenbrand <david@redhat.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Oscar Salvador <osalvador@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 8877734b5f2f..5248323fc0f7 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1194,7 +1194,6 @@ static pg_data_t __ref *hotadd_init_pgdat(int nid)
* online_pages() and offline_pages().
* TODO: should be in free_area_init_core_hotplug?
*/
- reset_node_managed_pages(pgdat);
reset_node_present_pages(pgdat);
return pgdat;