Re: [PATCH v3] mm/memory hotplug/unplug: Optimize zone contiguous check when changing pfn range

David Hildenbrand (Arm)
2026-04-08T12:31:11Z

>>
>> 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