Re: [PATCH v1 1/2] mm/page_alloc: conditionally split > pageblock_order pages in free_one_page() and move_freepages_block_isolate()

From: David Hildenbrand
Date: Tue Dec 10 2024 - 04:44:47 EST


On 09.12.24 20:01, Vlastimil Babka wrote:
On 12/6/24 10:59, David Hildenbrand wrote:
Let's special-case for the common scenarios that:

(a) We are freeing pages <= pageblock_order
(b) We are freeing a page <= MAX_PAGE_ORDER and all pageblocks match
(especially, no mixture of isolated and non-isolated pageblocks)

Well in many of those cases we could also just adjust the pageblocks... But
perhaps they indeed shouldn't differ in the first place, unless there's an
isolation attempt.

Thanks for the review and finding that one flaw.

Yes, I agree: usually we expect this to only happen with isolated pageblocks. At least in the scenarios I have in mind (boot, hotplug, alloc_contig_range()), we should only ever have a mixture of isolated and !isolated.

Maybe one could even special case on zone->nr_isolate_pageblock: if 0, just assume all pageblocks are the equal. I'll look into some details and might send a follow-up patch.

--
Cheers,

David / dhildenb