]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/memory_hotplug: move debug_pagealloc_map_pages() into online_pages_range()
authorDavid Hildenbrand <david@redhat.com>
Tue, 3 Dec 2024 10:20:50 +0000 (11:20 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:40:44 +0000 (22:40 -0800)
commitdd467f92db404ca2e061889ad1b6dd6221390222
tree930abe7f42e2973e7f172497af7de974027124c9
parentbef5418d1f3dee46bee1198d0c4a9c7c63fc2514
mm/memory_hotplug: move debug_pagealloc_map_pages() into online_pages_range()

In the near future, we want to have a single way to handover PageOffline
pages to the buddy, whereby they could have:

(a) Never been exposed to the buddy before: kept PageOffline when onlining
    the memory block.
(b) Been allocated from the buddy, for example using
    alloc_contig_range() to then be set PageOffline,

Let's start by making generic_online_page()->__free_pages_core() less
special compared to ordinary page freeing (e.g., free_contig_range()),
and perform the debug_pagealloc_map_pages() call unconditionally, even
when the online callback might decide to keep the pages offline.

All pages are already initialized with PageOffline, so nobody touches them
either way.

Link: https://lkml.kernel.org/r/20241203102050.223318-1-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Acked-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory_hotplug.c
mm/page_alloc.c