Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
mm/page_isolation.c: dump page owner if fail to isolate
Browse files Browse the repository at this point in the history
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 <jay.xu@rock-chips.com>
  • Loading branch information
jayxurockchip committed Sep 28, 2022
1 parent f537dfe commit bc8ef86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm/page_isolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bc8ef86

Please sign in to comment.