From: Mauricio Faria de Oliveira <mfo@igalia.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Zhen Ni <zhen.ni@easystack.cn>
Cc: kernel-dev@igalia.com, linux-mm@kvack.org,
linux-doc@vger.kernel.org,
Mauricio Faria de Oliveira <mfo@igalia.com>
Subject: [PATCH] mm/page_owner: document shell usage of page_owner filters
Date: Thu, 26 Nov 2026 13:40:02 -0300 [thread overview]
Message-ID: <20261126-page_owner_filter_shell-v1-1-cbbcff2fcb08@igalia.com> (raw)
Document how to use page_owner filters directly from the shell,
without relying on the page_owner_filter tool, with an example.
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
---
Tested with `make htmldocs` and checking the change in a web browser.
---
Documentation/mm/page_owner.rst | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/mm/page_owner.rst b/Documentation/mm/page_owner.rst
index bd027377dff6ee8f06462884baee458d621686b7..11fdde0ab77d6610dc3ad2234e30238bcdf1f226 100644
--- a/Documentation/mm/page_owner.rst
+++ b/Documentation/mm/page_owner.rst
@@ -343,3 +343,21 @@ terminals you can run different filters simultaneously::
# Terminal 2: Filter node 1 (runs concurrently)
./page_owner_filter -n 1 > node1_output.txt
+
+The shell can also be used instead of the page_owner_filter tool, as long as the
+same file descriptor is used to write filter commands then read filtered output.
+For example, using file descriptor 3::
+
+ # Open file in read-write mode
+ exec 3<>/sys/kernel/debug/page_owner
+
+ # Write filter command(s)
+ echo 'mode=handle' >&3
+ # (and/or)
+ echo 'nid=0' >&3
+
+ # Read filtered output
+ cat <&3 >output.txt
+
+ # Close file
+ exec 3>&-
---
base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
change-id: 20261126-page_owner_filter_shell-efce38f24e20
Best regards,
--
Mauricio Faria de Oliveira <mfo@igalia.com>
next reply other threads:[~2026-11-26 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 16:40 Mauricio Faria de Oliveira [this message]
2026-11-27 1:29 ` [PATCH] mm/page_owner: document shell usage of page_owner filters Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126-page_owner_filter_shell-v1-1-cbbcff2fcb08@igalia.com \
--to=mfo@igalia.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=kernel-dev@igalia.com \
--cc=liam@infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=vbabka@kernel.org \
--cc=zhen.ni@easystack.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox