On Sat, Mar 3, 2018 at 2:25 AM, Daniel Vacek <neelx@xxxxxxxxxx> wrote: > On Sat, Mar 3, 2018 at 1:41 AM, <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: >> >> diff -puN mm/page_alloc.c~mm-page_alloc-fix-memmap_init_zone-pageblock-alignment mm/page_alloc.c >> --- a/mm/page_alloc.c~mm-page_alloc-fix-memmap_init_zone-pageblock-alignment >> +++ a/mm/page_alloc.c >> @@ -5359,9 +5359,14 @@ void __meminit memmap_init_zone(unsigned >> /* >> * Skip to the pfn preceding the next valid one (or >> * end_pfn), such that we hit a valid pfn (or end_pfn) >> - * on our next iteration of the loop. >> + * on our next iteration of the loop. Note that it needs >> + * to be pageblock aligned even when the region itself >> + * is not. move_freepages_block() can shift ahead of >> + * the valid region but still depends on correct page >> + * metadata. >> */ >> - pfn = memblock_next_valid_pfn(pfn, end_pfn) - 1; >> + pfn = (memblock_next_valid_pfn(pfn, end_pfn) & >> + ~(pageblock_nr_pages-1)) - 1; > > Did you revert the first patch of the series for some reason? > Nah, you're just keeping the API to make them independent for the time being. I see... --nX