lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220620081518.GA26066@axis.com>
Date:   Mon, 20 Jun 2022 10:15:19 +0200
From:   Vincent Whitchurch <vincent.whitchurch@...s.com>
To:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        Jonathan Corbet <corbet@....net>
CC:     kernel <kernel@...s.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v2] mm/smaps: add Pss_Dirty

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@...s.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).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ