From patchwork Fri Mar 25 01:08:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12791108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BAF7C433F5 for ; Fri, 25 Mar 2022 01:08:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1DF546B0071; Thu, 24 Mar 2022 21:08:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 168D98D0006; Thu, 24 Mar 2022 21:08:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E39A26B0078; Thu, 24 Mar 2022 21:08:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id D23F36B0071 for ; Thu, 24 Mar 2022 21:08:58 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 96253A4DDC for ; Fri, 25 Mar 2022 01:08:58 +0000 (UTC) X-FDA: 79281124356.27.F3C935A Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id 258AC40012 for ; Fri, 25 Mar 2022 01:08:57 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 11D47B81DE2; Fri, 25 Mar 2022 01:08:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB019C340EC; Fri, 25 Mar 2022 01:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648170536; bh=Fq1WgJ7I2oittD73GD1Je7sD6NEjKS/Jlihe9Ym9qYo=; h=Date:To:From:In-Reply-To:Subject:From; b=FZzyr+W/ISn+xSC291hm7XZQnuyIIUAwCgL/ypFlqWsp7zCWGSqxUNtAf8NIjAQnr bSlDUlXc4CnYxaEvq8YDfAld15F/vb0JrbSRViA7goOmZRZrVfX20y9zqyA2EE0VZy ayRzI4rkNcc/HDwPZPV2VqBqzOJqfFNSp4D/xXPA= Date: Thu, 24 Mar 2022 18:08:56 -0700 To: zhangshengju@cmss.chinamobile.com,weizhenliang@huawei.com,vbabka@suse.cz,tangbin@cmss.chinamobile.com,nixiaoming@huawei.com,lmark@codeaurora.org,georgi.djakov@linaro.org,corbet@lwn.net,hanshenghong2019@email.szu.edu.cn,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220324180758.96b1ac7e17675d6bc474485e@linux-foundation.org> Subject: [patch 007/114] Documentation/vm/page_owner.rst: update the documentation Message-Id: <20220325010856.AB019C340EC@smtp.kernel.org> Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="FZzyr+W/"; spf=pass (imf11.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: kiqrroo3igcfgjpsk95fw7yz56fqmdse X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 258AC40012 X-HE-Tag: 1648170537-286232 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Shenghong Han Subject: Documentation/vm/page_owner.rst: update the documentation Update the documentation of ``page_owner``. [akpm@linux-foundation.org: small grammatical tweaks] Link: https://lkml.kernel.org/r/20211214134736.2569-1-hanshenghong2019@email.szu.edu.cn Signed-off-by: Shenghong Han Cc: Jonathan Corbet Cc: Vlastimil Babka Cc: Georgi Djakov Cc: Liam Mark Cc: Tang Bin Cc: Zhang Shengju Cc: Zhenliang Wei Cc: Xiaoming Ni Signed-off-by: Andrew Morton --- Documentation/vm/page_owner.rst | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) --- a/Documentation/vm/page_owner.rst~documentation-vm-page_ownerrst-update-the-documentation +++ a/Documentation/vm/page_owner.rst @@ -97,7 +97,7 @@ Usage The ``page_owner_sort`` tool ignores ``PFN`` rows, puts the remaining rows in buf, uses regexp to extract the page order value, counts the times - and pages of buf, and finally sorts them according to the times. + and pages of buf, and finally sorts them according to the parameter(s). See the result about who allocated each page in the ``sorted_page_owner.txt``. General output:: @@ -107,4 +107,23 @@ Usage // Detailed stack By default, ``page_owner_sort`` is sorted according to the times of buf. - If you want to sort by the pages nums of buf, use the ``-m`` parameter. + If you want to sort by the page nums of buf, use the ``-m`` parameter. + The detailed parameters are: + + fundamental function: + + Sort: + -a Sort by memory allocation time. + -m Sort by total memory. + -p Sort by pid. + -r Sort by memory release time. + -s Sort by stack trace. + -t Sort by times (default). + + additional function: + + Cull: + -c Cull by comparing stacktrace instead of total block. + + Filter: + -f Filter out the information of blocks whose memory has not been released.