In memory hot-remove procedure, we free pagetable pages to buddy system. But for local pagetable pages, do not free them to buddy system because they were skipped in offline procedure. The memory block they reside in could have been offlined, and we won't offline it again. v1 -> v2: Prevent freeing LOCAL_NODE_DATA pages in free_pagetable() instead of in put_page_bootmem(). Suggested-by: Wu Jianguo <wujianguo@xxxxxxxxxx> Signed-off-by: Tang Chen <tangchen@xxxxxxxxxxxxxx> --- arch/x86/mm/init_64.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 25de304..ffaf24a 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -726,7 +726,13 @@ static void __meminit free_pagetable(struct page *page, int order) if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) { while (nr_pages--) put_page_bootmem(page++); - } else + } else if (!is_local_node_data(page)) + /* + * Do not free pages with local node kernel data + * (for now, just local pagetables) to the buddy + * system because we skipped these pages when + * offlining the corresponding block. + */ __free_pages_bootmem(page, order); } else free_pages((unsigned long)page_address(page), order); -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>