|author||Joonsoo Kim <firstname.lastname@example.org>||2014-12-12 16:56:01 -0800|
|committer||Linus Torvalds <email@example.com>||2014-12-13 12:42:48 -0800|
|parent||stacktrace: introduce snprint_stack_trace for buffer output (diff)|
mm/page_owner: keep track of page owners
This is the page owner tracking code which is introduced so far ago. It is resident on Andrew's tree, though, nobody tried to upstream so it remain as is. Our company uses this feature actively to debug memory leak or to find a memory hogger so I decide to upstream this feature. This functionality help us to know who allocates the page. When allocating a page, we store some information about allocation in extra memory. Later, if we need to know status of all pages, we can get and analyze it from this stored information. In previous version of this feature, extra memory is statically defined in struct page, but, in this version, extra memory is allocated outside of struct page. It enables us to turn on/off this feature at boottime without considerable memory waste. Although we already have tracepoint for tracing page allocation/free, using it to analyze page owner is rather complex. We need to enlarge the trace buffer for preventing overlapping until userspace program launched. And, launched program continually dump out the trace buffer for later analysis and it would change system behaviour with more possibility rather than just keeping it in memory, so bad for debug. Moreover, we can use page_owner feature further for various purposes. For example, we can use it for fragmentation statistics implemented in this patch. And, I also plan to implement some CMA failure debugging feature using this interface. I'd like to give the credit for all developers contributed this feature, but, it's not easy because I don't know exact history. Sorry about that. Below is people who has "Signed-off-by" in the patches in Andrew's tree. Contributor: Alexander Nyberg <firstname.lastname@example.org> Mel Gorman <email@example.com> Dave Hansen <firstname.lastname@example.org> Minchan Kim <email@example.com> Michal Nazarewicz <firstname.lastname@example.org> Andrew Morton <email@example.com> Jungsoo Son <firstname.lastname@example.org> Signed-off-by: Joonsoo Kim <email@example.com> Cc: Mel Gorman <firstname.lastname@example.org> Cc: Johannes Weiner <email@example.com> Cc: Minchan Kim <firstname.lastname@example.org> Cc: Dave Hansen <email@example.com> Cc: Michal Nazarewicz <firstname.lastname@example.org> Cc: Jungsoo Son <email@example.com> Cc: Ingo Molnar <firstname.lastname@example.org> Cc: Joonsoo Kim <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Diffstat (limited to 'Documentation')
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 6f067954675b..68153642c44e 100644
@@ -2513,6 +2513,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+ page_owner= [KNL] Boot-time page_owner enabling option.
+ Storage of the information about who allocated
+ each page is disabled in default. With this switch,
+ we can turn it on.
+ on: enable the feature
panic= [KNL] Kernel behaviour on panic: delay <timeout>
timeout > 0: seconds before rebooting
timeout = 0: wait forever