diff mbox series

[6/6] Documentation: update document for page_owner

Message ID 20230815125251.2865852-7-tujinjiang@huawei.com (mailing list archive)
State New
Headers show
Series page_owner: support filtering by module | expand

Commit Message

Jinjiang Tu Aug. 15, 2023, 12:52 p.m. UTC
page_owner currently supports recording and filtering
pages allocates/freed by modules. Also, page_owner
supports dumping name and the nr of pages allocated
for each module when oom occurs. Update the document for the
new features.

Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
---
 Documentation/mm/page_owner.rst | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/mm/page_owner.rst b/Documentation/mm/page_owner.rst
index 62e3f7ab23cc..2231c16cd993 100644
--- a/Documentation/mm/page_owner.rst
+++ b/Documentation/mm/page_owner.rst
@@ -54,6 +54,12 @@  are caught and marked, although they are mostly allocated from struct
 page extension feature. Anyway, after that, no page is left in
 un-tracking state.
 
+page owner is able to track if the pages are allocated by modules. If a page
+is allocated by a module, the information dumped from page_owner interface
+will show the module name. Users can use the user-space helper to analyze the
+allocation situation of modules. Besides, the modules that allocate pages will
+be dumped when oom occurs.
+
 Usage
 =====
 
@@ -142,6 +148,7 @@  Usage
 
 	Filter:
 		-f		Filter out the information of blocks whose memory has been released.
+		-M		Filter out the information of blocks whose memory isn't allocated by modules.
 
 	Select:
 		--pid <pidlist>		Select by pid. This selects the blocks whose process ID
@@ -150,8 +157,10 @@  Usage
 					group ID numbers appear in <tgidlist>.
 		--name <cmdlist>	Select by task command name. This selects the blocks whose
 					task command name appear in <cmdlist>.
+		--module <modulelist>   Select by module. This selects the information of blocks whose
+					memory is allocated by modules appear in <modulelist>.
 
-		<pidlist>, <tgidlist>, <cmdlist> are single arguments in the form of a comma-separated list,
+		<pidlist>, <tgidlist>, <cmdlist>, <modulelist> are single arguments in the form of a comma-separated list,
 		which offers a way to specify individual selecting rules.
 
 
@@ -175,6 +184,7 @@  STANDARD FORMAT SPECIFIERS
 	ft		free_ts		timestamp of the page when it was released
 	at		alloc_ts	timestamp of the page when it was allocated
 	ator		allocator	memory allocator for pages
+	mod     module      the name of the module that the page is allocated by
 
   For --cull option:
 
@@ -185,3 +195,4 @@  STANDARD FORMAT SPECIFIERS
 	f		free		whether the page has been released or not
 	st		stacktrace	stack trace of the page allocation
 	ator		allocator	memory allocator for pages
+	mod     module      the name of the module that the page is allocated by