From: Alexey Dobriyan <adobriyan@gmail.com>
To: robert.foss@collabora.com
Cc: akpm@linux-foundation.org, keescook@chromium.org,
viro@zeniv.linux.org.uk, gorcunov@openvz.org,
john.stultz@linaro.org, plaguedbypenguins@gmail.com,
sonnyrao@chromium.org, mguzik@redhat.com, jdanis@google.com,
calvinowens@fb.com, jann@thejh.net, mhocko@suse.com,
koct9i@gmail.com, vbabka@suse.cz, n-horiguchi@ah.jp.nec.com,
kirill.shutemov@linux.intel.com, ldufour@linux.vnet.ibm.com,
hannes@cmpxchg.org, linux-kernel@vger.kernel.org,
Ben Zhang <benzh@chromium.org>, Bryan Freed <bfreed@chromium.org>,
Filipe Brandenburger <filbranden@chromium.org>
Subject: Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps
Date: Tue, 9 Aug 2016 19:58:40 +0300 [thread overview]
Message-ID: <20160809165840.GA18881@p183.telecom.by> (raw)
In-Reply-To: <1470758743-17685-1-git-send-email-robert.foss@collabora.com>
On Tue, Aug 09, 2016 at 12:05:43PM -0400, robert.foss@collabora.com wrote:
> From: Sonny Rao <sonnyrao@chromium.org>
>
> This is based on earlier work by Thiago Goncales. It implements a new
> per process proc file which summarizes the contents of the smaps file
> but doesn't display any addresses. It gives more detailed information
> than statm like the PSS (proprotional set size). It differs from the
> original implementation in that it doesn't use the full blown set of
> seq operations, uses a different termination condition, and doesn't
> displayed "Locked" as that was broken on the original implemenation.
>
> This new proc file provides information faster than parsing the potentially
> huge smaps file.
You can "parse" /proc/*/pagemap . RSS, swap are there.
So which ones do you really need?
Why the separate anon hugepages and anon regular pages?
> + seq_printf(m,
> + "Rss: %8lu kB\n"
> + "Pss: %8lu kB\n"
> + "Shared_Clean: %8lu kB\n"
> + "Shared_Dirty: %8lu kB\n"
> + "Private_Clean: %8lu kB\n"
> + "Private_Dirty: %8lu kB\n"
> + "Referenced: %8lu kB\n"
> + "Anonymous: %8lu kB\n"
> + "AnonHugePages: %8lu kB\n"
> + "Swap: %8lu kB\n",
> + mss_sum->resident >> 10,
> + (unsigned long)(mss_sum->pss >> (10 + PSS_SHIFT)),
> + mss_sum->shared_clean >> 10,
> + mss_sum->shared_dirty >> 10,
> + mss_sum->private_clean >> 10,
> + mss_sum->private_dirty >> 10,
> + mss_sum->referenced >> 10,
> + mss_sum->anonymous >> 10,
> + mss_sum->anonymous_thp >> 10,
> + mss_sum->swap >> 10);
next prev parent reply other threads:[~2016-08-09 16:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 16:05 [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps robert.foss
2016-08-09 16:29 ` Mateusz Guzik
2016-08-09 16:56 ` Sonny Rao
2016-08-09 20:17 ` Robert Foss
2016-08-10 15:39 ` Robert Foss
2016-08-10 15:42 ` Mateusz Guzik
2016-08-10 15:50 ` Robert Foss
2016-08-09 16:58 ` Alexey Dobriyan [this message]
2016-08-09 18:28 ` Sonny Rao
2016-08-09 19:16 ` Konstantin Khlebnikov
2016-08-10 0:30 ` Sonny Rao
2016-08-09 19:24 ` Jann Horn
2016-08-09 21:01 ` Robert Foss
2016-08-09 22:30 ` Jann Horn
2016-08-10 14:16 ` Robert Foss
2016-08-10 15:02 ` Jann Horn
2016-08-10 16:24 ` Robert Foss
2016-08-10 17:23 ` Sonny Rao
2016-08-10 17:37 ` Jann Horn
2016-08-10 17:45 ` Sonny Rao
2016-08-10 18:05 ` Jann Horn
2016-08-12 16:28 ` Robert Foss
2016-08-13 12:39 ` Jann Horn
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=20160809165840.GA18881@p183.telecom.by \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benzh@chromium.org \
--cc=bfreed@chromium.org \
--cc=calvinowens@fb.com \
--cc=filbranden@chromium.org \
--cc=gorcunov@openvz.org \
--cc=hannes@cmpxchg.org \
--cc=jann@thejh.net \
--cc=jdanis@google.com \
--cc=john.stultz@linaro.org \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=koct9i@gmail.com \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mguzik@redhat.com \
--cc=mhocko@suse.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=plaguedbypenguins@gmail.com \
--cc=robert.foss@collabora.com \
--cc=sonnyrao@chromium.org \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
/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