linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: semenzato@chromium.org
Cc: linux-mm@kvack.org, yuzhao@chromium.org, bgeffon@chromium.org,
	sonnyrao@chromium.org
Subject: Re: [PATCH 1/1] mm: smaps: split PSS into components
Date: Wed, 26 Jun 2019 15:19:47 -0700	[thread overview]
Message-ID: <20190626151947.9876bb0ed8b2953813bfa5c6@linux-foundation.org> (raw)
In-Reply-To: <20190626180429.174569-1-semenzato@chromium.org>

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.



  reply	other threads:[~2019-06-26 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 18:04 semenzato
2019-06-26 22:19 ` Andrew Morton [this message]
2019-06-26 23:40   ` Luigi Semenzato
  -- 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=20190626151947.9876bb0ed8b2953813bfa5c6@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bgeffon@chromium.org \
    --cc=linux-mm@kvack.org \
    --cc=semenzato@chromium.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