Re: [PATCH RESEND v1] mm/memory_hotplug: move debug_pagealloc_map_pages() into online_pages_range()
From: Oscar Salvador
Date: Tue Dec 03 2024 - 11:36:34 EST
On Tue, Dec 03, 2024 at 11:20:50AM +0100, David Hildenbrand wrote:
> 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() less special compared to
This got me confused for a moment. I'd have said "making
__free_pages_core" less special? As that is where we were calling
debug_pagealloc_map_pages() if the context on the context.
> 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.
>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Oscar Salvador <osalvador@xxxxxxx>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Acked-by: Oscar Salvador <osalvador@xxxxxxx>
--
Oscar Salvador
SUSE Labs