On Thu, May 21, 2020 at 08:00:31AM -0700, Alexander Duyck wrote: > So I was thinking about my suggestion further and the loop at the end > isn't quite correct as I believe it could lead to gaps. The loop on > the end should probably be: > for_each_free_mem_pfn_range_in_zone_from(i, zone, spfn, epfn) { > if (epfn <= epfn_align) > continue; > if (spfn < epfn_align) > spfn = epfn_align; > break; > } > > That would generate a new range where epfn_align has actually ended > and there is a range of new PFNs to process. Whoops, my email crossed with yours. Agreed, but see the other message.