diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2016-10-07 20:01:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-07 21:46:29 -0400 |
commit | 9996f05eac09815121bb718249f21914a667791f (patch) | |
tree | 5895100f41462c5aa2c68a8b992ba2f2845b134b /mm/debug.c | |
parent | 8f26e0b176f3484c49d55d88fe6083a9cf9ff443 (diff) |
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 <kirill.shutemov@linux.intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/debug.c')
-rw-r--r-- | mm/debug.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/debug.c b/mm/debug.c index 74c7cae4f683..9feb699c5d25 100644 --- a/mm/debug.c +++ b/mm/debug.c | |||
@@ -42,6 +42,11 @@ const struct trace_print_flags vmaflag_names[] = { | |||
42 | 42 | ||
43 | void __dump_page(struct page *page, const char *reason) | 43 | void __dump_page(struct page *page, const char *reason) |
44 | { | 44 | { |
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 | */ | ||
45 | int mapcount = PageSlab(page) ? 0 : page_mapcount(page); | 50 | int mapcount = PageSlab(page) ? 0 : page_mapcount(page); |
46 | 51 | ||
47 | pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx", | 52 | pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx", |