summaryrefslogtreecommitdiffstats
path: root/Documentation/vm/page_owner.rst
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2020-12-14 19:04:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 12:13:38 -0800
commit9cc7e96aa846f9086431d6c2d33ff9ab42d72b2d (patch)
treeb88db2429adcfd9bb35b32c396a2e32ec2545e33 /Documentation/vm/page_owner.rst
parent7fb7ab6d618a4dc7ea3f3eafc92388a35b4f8894 (diff)
mm/page_owner: record timestamp and pid
Collect the time for each allocation recorded in page owner so that allocation "surges" can be measured. Record the pid for each allocation recorded in page owner so that the source of allocation "surges" can be better identified. The above is very useful when doing memory analysis. On a crash for example, we can get this information from kdump (or ramdump) and parse it to figure out memory allocation problems. Please note that on x86_64 this increases the size of struct page_owner from 16 bytes to 32. Vlastimil: it's not a functionality intended for production, so unless somebody says they need to enable page_owner for debugging and this increase prevents them from fitting into available memory, let's not complicate things with making this optional. [lmark@codeaurora.org: v3] Link: https://lkml.kernel.org/r/20201210160357.27779-1-georgi.djakov@linaro.org Link: https://lkml.kernel.org/r/20201209125153.10533-1-georgi.djakov@linaro.org Signed-off-by: Liam Mark <lmark@codeaurora.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/vm/page_owner.rst')
-rw-r--r--Documentation/vm/page_owner.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Documentation/vm/page_owner.rst b/Documentation/vm/page_owner.rst
index 02deac76673f..4e67c2e9bbed 100644
--- a/Documentation/vm/page_owner.rst
+++ b/Documentation/vm/page_owner.rst
@@ -41,17 +41,17 @@ size change due to this facility.
- Without page owner::
text data bss dec hex filename
- 40662 1493 644 42799 a72f mm/page_alloc.o
+ 48392 2333 644 51369 c8a9 mm/page_alloc.o
- With page owner::
text data bss dec hex filename
- 40892 1493 644 43029 a815 mm/page_alloc.o
- 1427 24 8 1459 5b3 mm/page_ext.o
- 2722 50 0 2772 ad4 mm/page_owner.o
+ 48800 2445 644 51889 cab1 mm/page_alloc.o
+ 6574 108 29 6711 1a37 mm/page_owner.o
+ 1025 8 8 1041 411 mm/page_ext.o
-Although, roughly, 4 KB code is added in total, page_alloc.o increase by
-230 bytes and only half of it is in hotpath. Building the kernel with
+Although, roughly, 8 KB code is added in total, page_alloc.o increase by
+520 bytes and less than half of it is in hotpath. Building the kernel with
page owner and turning it on if needed would be great option to debug
kernel memory problem.