From: Luigi Semenzato <semenzato@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
Yu Zhao <yuzhao@chromium.org>,
bgeffon@chromium.org, Sonny Rao <sonnyrao@chromium.org>
Subject: Re: [PATCH 1/1] mm: smaps: split PSS into components
Date: Wed, 26 Jun 2019 16:40:41 -0700 [thread overview]
Message-ID: <CAA25o9RJb9EJxJTHWqWjkOr+h+FrtowpfB4+_mEY7TUrUXHuNQ@mail.gmail.com> (raw)
In-Reply-To: <20190626151947.9876bb0ed8b2953813bfa5c6@linux-foundation.org>
On Wed, Jun 26, 2019 at 3:19 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 26 Jun 2019 11:04:29 -0700 semenzato@chromium.org wrote:
>
> > From: Luigi Semenzato <semenzato@chromium.org>
> >
> > Report separate components (anon, file, and shmem)
> > for PSS in smaps_rollup.
> >
> > This helps understand and tune the memory manager behavior
> > in consumer devices, particularly mobile devices. Many of
> > them (e.g. chromebooks and Android-based devices) use zram
> > for anon memory, and perform disk reads for discarded file
> > pages. The difference in latency is large (e.g. reading
> > a single page from SSD is 30 times slower than decompressing
> > a zram page on one popular device), thus it is useful to know
> > how much of the PSS is anon vs. file.
> >
> > This patch also removes a small code duplication in smaps_account,
> > which would have gotten worse otherwise.
> >
> > Also added missing entry for smaps_rollup in
> > Documentation/filesystems/proc.txt.
> >
> > ...
> >
> > -static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss)
> > +static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss,
> > + bool rollup_mode)
> > {
> > SEQ_PUT_DEC("Rss: ", mss->resident);
> > SEQ_PUT_DEC(" kB\nPss: ", mss->pss >> PSS_SHIFT);
> > + if (rollup_mode) {
> > + /*
> > + * These are meaningful only for smaps_rollup, otherwise two of
> > + * them are zero, and the other one is the same as Pss.
> > + */
> > + SEQ_PUT_DEC(" kB\nPss_Anon: ",
> > + mss->pss_anon >> PSS_SHIFT);
> > + SEQ_PUT_DEC(" kB\nPss_File: ",
> > + mss->pss_file >> PSS_SHIFT);
> > + SEQ_PUT_DEC(" kB\nPss_Shmem: ",
> > + mss->pss_shmem >> PSS_SHIFT);
> > + }
>
> Documentation/filesystems/proc.txt is rather incomplete. It documents
> /proc/PID/smaps (seems to be out of date) but doesn't describe the
> fields in smaps_rollup.
>
> Please update Documentation/ABI/testing/procfs-smaps_rollup and please
> check that it's up-to-date while you're in there.
>
Thank you for noticing the stale/missing docs and sorry that I did not.
Will email the updated patch shortly.
next prev parent reply other threads:[~2019-06-26 23:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 18:04 [PATCH 1/1] mm: smaps: split PSS into components semenzato
2019-06-26 22:19 ` Andrew Morton
2019-06-26 23:40 ` Luigi Semenzato [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-05-22 23:53 semenzato
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=CAA25o9RJb9EJxJTHWqWjkOr+h+FrtowpfB4+_mEY7TUrUXHuNQ@mail.gmail.com \
--to=semenzato@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=bgeffon@chromium.org \
--cc=linux-mm@kvack.org \
--cc=sonnyrao@chromium.org \
--cc=yuzhao@chromium.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).