Skip to content

Commit 9996f05

Browse files
kiryltorvalds
authored andcommitted
mm: clarify why we avoid page_mapcount() for slab pages in dump_page()
Let's add comment on why we skip page_mapcount() for sl[aou]b pages. Link: http://lkml.kernel.org/r/20160922105532.GB24593@node Signed-off-by: Kirill A. Shutemov <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 8f26e0b commit 9996f05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mm/debug.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ const struct trace_print_flags vmaflag_names[] = {
4242

4343
void __dump_page(struct page *page, const char *reason)
4444
{
45+
/*
46+
* Avoid VM_BUG_ON() in page_mapcount().
47+
* page->_mapcount space in struct page is used by sl[aou]b pages to
48+
* encode own info.
49+
*/
4550
int mapcount = PageSlab(page) ? 0 : page_mapcount(page);
4651

4752
pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx",

0 commit comments

Comments
 (0)