Re: [PATCH v3] mm/memory hotplug/unplug: Optimize zone->contiguous update when move pfn range

David Hildenbrand (Red Hat)
2025-11-28T16:05:00Z

>
> Instead of a bool value, could the clear_zone_contiguous_for_growing
> and clear_zone_contiguous_for_shrinking return a enum value to indicate
> one of the three states: 1. DEFINITELY_CONTIGUOUS;
> 2. DEFINITELY_NOT_CONTIGUOUS; 3. UNDETERMINED_CONTIGUOUS? The
> set_zone_contiguous took the state and skip the contiguous check if
> DEFINITELY_CONTIGUOUS or DEFINITELY_NOT_CONTIGUOUS.

I had the exact same thought while writing my rely, so it's worth
investigating.

If that helps to come up with even better+descriptive variable/function
names, even better :)

--
Cheers

David