From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1F941FB7 for ; Fri, 25 Mar 2022 01:08:56 +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> Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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. _