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 --- 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