From bc8ef86861382473416451e42a5095ea64cfd44b Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Wed, 27 Nov 2019 09:06:46 +0800 Subject: [PATCH] mm/page_isolation.c: dump page owner if fail to isolate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CMA alloc may failure due to page busy caused by isolated failure, it's helpful to dump page owner stack for debug. To use this debug, there should enable PAGE_OWNER debug first by - CONFIG_PAGE_OWNER=y - add “page_owner=on” to boot cmdline then it will shows as following: page allocated via order 0, migratetype Movable, gfp_mask 0x6212ca(GFP_HIGHUSER_MOVABLE|__GFP_NOWARN|__GFP_NORETRY) get_page_from_freelist+0x1404/0x1920 __alloc_pages_nodemask+0xf4/0xe90 __do_page_cache_readahead+0x104/0x1f0 filemap_fault+0x3d4/0x618 ext4_filemap_fault+0x30/0x50 __do_fault+0x50/0x118 __handle_mm_fault+0x7e4/0xb40 handle_mm_fault+0xcc/0x1a0 do_page_fault+0x1f0/0x4a8 do_translation_fault+0x5c/0x64 do_mem_abort+0x54/0xf8 el0_da+0x1c/0x20 Change-Id: I94b02a7c4ce9174f8151e0979e18adba4011c1d2 Signed-off-by: Jianqun Xu --- mm/page_isolation.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index b391091bfd5c..48ff14250004 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -279,6 +279,10 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, else break; } +#ifdef CONFIG_NO_GKI + if (pfn < end_pfn) + dump_page_owner(page); +#endif return pfn; }