mm/page_owner: record the timestamp of all pages during free
authorGeorgi Djakov <georgi.djakov@linaro.org>
Fri, 30 Apr 2021 05:54:57 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2021 18:20:36 +0000 (11:20 -0700)
commit866b485262173a2b873386162b2ddcfbcb542b4a
treeb63068ea624c637d2a3bb8fc249dbc2f2fd4dbbd
parent0b5121ef85102edc936b199fb239a1f8cce48018
mm/page_owner: record the timestamp of all pages during free

Collect the time when each allocation is freed, to help with memory
analysis with kdump/ramdump.  Add the timestamp also in the page_owner
debugfs file and print it in dump_page().

Having another timestamp when we free the page helps for debugging page
migration issues.  For example both alloc and free timestamps being the
same can gave hints that there is an issue with migrating memory, as
opposed to a page just being dropped during migration.

Link: https://lkml.kernel.org/r/20210203175905.12267-1-georgi.djakov@linaro.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
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>
Documentation/vm/page_owner.rst
mm/page_owner.c