linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: kernel <kernel@axis.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH v2] mm/smaps: add Pss_Dirty
Date: Mon, 20 Jun 2022 10:15:19 +0200	[thread overview]
Message-ID: <20220620081518.GA26066@axis.com> (raw)
In-Reply-To: <20220620081251.2928103-1-vincent.whitchurch@axis.com>

On Mon, Jun 20, 2022 at 10:12:50AM +0200, Vincent Whitchurch wrote:
> Pss is the sum of the sizes of clean and dirty private pages, and the
> proportional sizes of clean and dirty shared pages:
> 
>  Private = Private_Dirty + Private_Clean
>  Shared_Proportional = Shared_Dirty_Proportional + Shared_Clean_Proportional
>  Pss = Private + Shared_Proportional
> 
> The Shared*Proportional fields are not present in smaps, so it is not
> always possible to determine how much of the Pss is from dirty pages and
> how much is from clean pages.  This information can be useful for
> measuring memory usage for the purpose of optimisation, since clean
> pages can usually be discarded by the kernel immediately while dirty
> pages cannot.
> 
> The smaps routines in the kernel already have access to this data, so
> add a Pss_Dirty to show it to userspace.  Pss_Clean is not added since
> it can be calculated from Pss and Pss_Dirty.
> 
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
> ---

I forgot to include the changelog:

  v2:
  - Update Documentation/ABI/testing/procfs-smaps_rollup and
    Documentation/filesystems/proc.rst.
  - Move Pss_Dirty next to Pss so that the location is consistent between
    non-rollup and rollup (since the later has some extra Pss* fields).


      reply	other threads:[~2022-06-20  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  8:12 [PATCH v2] mm/smaps: add Pss_Dirty Vincent Whitchurch
2022-06-20  8:15 ` Vincent Whitchurch [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=20220620081518.GA26066@axis.com \
    --to=vincent.whitchurch@axis.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=kernel@axis.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).