From: Andrew Morton <akpm@linux-foundation.org>
To: Mauricio Faria de Oliveira <mfo@igalia.com>
Cc: 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>,
kernel-dev@igalia.com, linux-mm@kvack.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH] mm/page_owner: document shell usage of page_owner filters
Date: Thu, 26 Nov 2026 17:29:34 -0800 [thread overview]
Message-ID: <20261126172934.69755dd97d3716e83fa25c2d@linux-foundation.org> (raw)
In-Reply-To: <20261126-page_owner_filter_shell-v1-1-cbbcff2fcb08@igalia.com>
On Thu, 26 Nov 2026 13:40:02 -0300 Mauricio Faria de Oliveira <mfo@igalia.com> wrote:
> Document how to use page_owner filters directly from the shell,
> without relying on the page_owner_filter tool, with an example.
Thanks.
If people don't want to use the tool then they can just look in
/sys/kernel/debug/page_owner and figure it out for themselves. But...
> + # 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>&-
The need to do both "configure it" and "use it" using the same fd is a
bit subtle for script development so people may find this small
addition useful.
prev parent reply other threads:[~2026-11-27 1:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 16:40 [PATCH] mm/page_owner: document shell usage of page_owner filters Mauricio Faria de Oliveira
2026-11-27 1:29 ` Andrew Morton [this message]
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=20261126172934.69755dd97d3716e83fa25c2d@linux-foundation.org \
--to=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=mfo@igalia.com \
--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