]> Git Repo - linux.git/commit
mm, page_owner: keep owner info when freeing the page
authorVlastimil Babka <[email protected]>
Mon, 23 Sep 2019 22:34:39 +0000 (15:34 -0700)
committerLinus Torvalds <[email protected]>
Tue, 24 Sep 2019 22:54:08 +0000 (15:54 -0700)
commit37389167a281f3ccb6bc958c32b2e088c7269fe0
tree7cd33b000d372866bb3d679b1bac67f745c66695
parent7e2f2a0cd17cfc42acb4b6a293d5cb6c7eda9862
mm, page_owner: keep owner info when freeing the page

For debugging purposes it might be useful to keep the owner info even
after page has been freed, and include it in e.g.  dump_page() when
detecting a bad page state.  For that, change the PAGE_EXT_OWNER flag
meaning to "page owner info has been set at least once" and add new
PAGE_EXT_OWNER_ACTIVE for tracking whether page is supposed to be
currently tracked allocated or free.  Adjust dump_page() accordingly,
distinguishing free and allocated pages.  In the page_owner debugfs file,
keep printing only allocated pages so that existing scripts are not
confused, and also because free pages are irrelevant for the memory
statistics or leak detection that's the typical use case of the file,
anyway.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Vlastimil Babka <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/page_ext.h
mm/page_owner.c
This page took 0.051071 seconds and 4 git commands to generate.