From: Andrew Morton <akpm@linux-foundation.org>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, yinghan@google.com
Subject: Re: [PATCH] memcg: doc the pagefault count
Date: Wed, 9 Nov 2011 14:44:56 -0800 [thread overview]
Message-ID: <20111109144456.df8e4ccc.akpm@linux-foundation.org> (raw)
In-Reply-To: <1320398121-17336-1-git-send-email-gaowanlong@cn.fujitsu.com>
On Fri, 4 Nov 2011 17:15:21 +0800
Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
> Pagefault count has added to memcg stats since commit 456f998e,
> but forgot to doc it.
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
> Documentation/cgroups/memory.txt | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
> index cc0ebc5..081f4f44 100644
> --- a/Documentation/cgroups/memory.txt
> +++ b/Documentation/cgroups/memory.txt
> @@ -389,6 +389,13 @@ mapped_file - # of bytes of mapped file (includes tmpfs/shmem)
> pgpgin - # of pages paged in (equivalent to # of charging events).
> pgpgout - # of pages paged out (equivalent to # of uncharging events).
> swap - # of bytes of swap usage
> +
> +pgfault - # of page-faults
> +pgmajfault - # of major page-faults
> + These two are different from "pgpgin"/"pgpgout" stat which
> + count number of pages charged/discharged to the cgroup and
> + have no meaning of reading/writing page to disk.
> +
> inactive_anon - # of bytes of anonymous memory and swap cache memory on
OK, but the documentation was already rather poor.
For a start, what do pgpgin and pgpgout actually count? How about
pgpgin: the number of pages read from disk as a result of pagefault
activity within this memcg (swapin and mapped-file pagein). Does not
include other causes of disk I/O such as read().
pgpgout: the number of pages written to disk as a result of swap and
mapped-file activity within this memcg. Does not include other causes
of disk I/O such as write().
(I'm really not sure if this is correct!)
What are the units: is it "pages" or "multiples of 4k"? If the latter
then userspace must go off and work out what pagesize the kernel is,
which is a bit ugly and is just asking for people to develop
monitoring tools which report wrong results on other-than-4k-pagesize
setups.
Once we have that settled then we can move on to documenting pgfault
and pgmajfault. What are the units? Exactly which kernel actions lead
to these counters being altered?
next prev parent reply other threads:[~2011-11-09 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 9:15 [PATCH] memcg: doc the pagefault count Wanlong Gao
2011-11-04 9:54 ` KAMEZAWA Hiroyuki
2011-11-09 22:44 ` Andrew Morton [this message]
2011-11-10 0:05 ` Ying Han
2011-11-10 0:22 ` Andrew Morton
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=20111109144456.df8e4ccc.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=gaowanlong@cn.fujitsu.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yinghan@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.