mm: clarify why we avoid page_mapcount() for slab pages in dump_page()
Subsystems (2)
[email protected]
maintainerPATCH 96/127 mm: clarify why we avoid page_mapcount() for slab pages in dump_page()
From: "Kirill A. Shutemov" <[email protected]>
Subject: 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.
Signed-off-by Kirill A. Shutemov <[email protected]>
Acked-by Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/debug.c | 5 +++++ 1 file changed, 5 insertions(+)
mm/debug.c renamed from mm/debug.c~mm-clarify-why-we-avoid-page_mapcount-for-slab-pages-in-dump_page +5 -0
@@ -42,6 +42,11 @@ const struct trace_print_flags vmaflag_nvoid __dump_page (struct page *page,const char *reason) { +/* +* Avoid VM_BUG_ON() in page_mapcount(). +* page->_mapcount space in struct page is used by sl[aou]b pages to +* encode own info. +*/ int mapcount =PageSlab (page) ?0 :page_mapcount (page); pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx",
_