Re: [PATCH v3] mm/memory hotplug/unplug: Optimize zone contiguous check when changing pfn range
From: David Hildenbrand (Arm)
Date: Wed Apr 08 2026 - 08:38:02 EST
>>
>> Maybe something like the following could make it nicer to read, just a
>> thought.
>>
>> unsigned long hole_start_pfn = *hole_pfn;
>>
>> if (hole_start_pfn < zone_start_pfn) {
>> init_unavailable_range(hole_start_pfn, zone_start_pfn,
>> zone_id, nid);
>> hole_start_pfn = zone_start_pfn;
>> }
>> pgcnt = init_unavailable_range(hole_start_pfn, start_pfn,
>> zone_id, nid);
>
> Yes, this looks better. I'll apply your suggestion
Best to wait for Mike's comments first! :)
--
Cheers,
David