On Wed, Mar 21, 2018 at 9:09 AM, Jia He <hejianet@xxxxxxxxx> wrote:Thanks for the infomation.
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfnsThere is a revert-mm-page_alloc-skip-over-regions-of-invalid-pfns-where-possible.patch
where possible") optimized the loop in memmap_init_zone(). But there is
still some room for improvement. E.g. if pfn and pfn+1 are in the same
memblock region, we can simply pfn++ instead of doing the binary search
in memblock_next_valid_pfn.
in -mm reverting b92df1de5d289c0b as it is fundamentally wrong by
design causing system panics on some machines with rare but still
valid mappings. Basically it skips valid pfns which are outside of
usable memory ranges (outside of memblock memory regions).