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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALWz4iyRARGMZWQB6topgLxuPcub9ZDAjZ0dw8O1a97Ax8iwJg@mail.gmail.com>
Date:	Wed, 9 Nov 2011 16:05:36 -0800
From:	Ying Han <yinghan@...gle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Wanlong Gao <gaowanlong@...fujitsu.com>,
	linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	kamezawa.hiroyu@...fujitsu.com
Subject: Re: [PATCH] memcg: doc the pagefault count

On Wed, Nov 9, 2011 at 2:44 PM, Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Fri, 4 Nov 2011 17:15:21 +0800
> Wanlong Gao <gaowanlong@...fujitsu.com> wrote:
>
> > Pagefault count has added to memcg stats since commit 456f998e,
> > but forgot to doc it.
> >
> > Signed-off-by: Wanlong Gao <gaowanlong@...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!)

 Andrew,
I am afraid those two stats in memcg world have different perspective
than the ones in vmstat. They are only incremented/decremented during
charge/uncharge, which is regardless of having IO involved. The
existing documentation isn't that clear i agree. How about:

 pgpgin         - # of 4k page charging events to the memory cgroup
 pgpgout       - # of 4k page uncharging events to the memory cgroup

--Ying


>
> 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?
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ