Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459050

Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps

From Sonny Rao <sonnyrao@chromium.org>
Newsgroups linux.kernel
Subject Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps
Date 2016-08-09 20:30 +0200
Message-ID <s4jWN-2Jb-5@gated-at.bofh.it> (permalink)
References <s4hLk-1pO-27@gated-at.bofh.it> <s4ixH-1HG-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 9, 2016 at 9:58 AM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> 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.


/proc/*pagemap is generally restricted and I don't believe it would
quickly give PSS.

>
> So which ones do you really need?

PSS and Swap are the most important.  RSS isn't precise enough because
it counts shared pages fully, and there tends to be a lot of sharing.

> Why the separate anon hugepages and anon regular pages?

I'm not sure if it's necessary, but that's how it's broken out in smaps.

>
> > +     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);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PACTH v1] mm, proc: Implement /proc/<pid>/totmaps robert.foss@collabora.com - 2016-08-09 18:10 +0200
  Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Mateusz Guzik <mguzik@redhat.com> - 2016-08-09 18:40 +0200
    Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Sonny Rao <sonnyrao@chromium.org> - 2016-08-09 19:00 +0200
    Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Robert Foss <robert.foss@collabora.com> - 2016-08-09 22:20 +0200
      Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Robert Foss <robert.foss@collabora.com> - 2016-08-10 20:10 +0200
        Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Robert Foss <robert.foss@collabora.com> - 2016-08-10 20:30 +0200
        Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Mateusz Guzik <mguzik@redhat.com> - 2016-08-10 23:00 +0200
  Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Alexey Dobriyan <adobriyan@gmail.com> - 2016-08-09 19:00 +0200
    Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Sonny Rao <sonnyrao@chromium.org> - 2016-08-09 20:30 +0200
  Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Konstantin Khlebnikov <koct9i@gmail.com> - 2016-08-09 21:20 +0200
    Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Sonny Rao <sonnyrao@chromium.org> - 2016-08-10 02:40 +0200
  Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Jann Horn <jann@thejh.net> - 2016-08-09 21:30 +0200
    Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Robert Foss <robert.foss@collabora.com> - 2016-08-09 23:10 +0200
      Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Jann Horn <jann@thejh.net> - 2016-08-10 00:40 +0200
        Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Jann Horn <jann@thejh.net> - 2016-08-10 20:40 +0200
          Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Robert Foss <robert.foss@collabora.com> - 2016-08-10 21:50 +0200
        Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Robert Foss <robert.foss@collabora.com> - 2016-08-10 21:00 +0200
      Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Jann Horn <jann@thejh.net> - 2016-08-10 20:10 +0200
      Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Jann Horn <jann@thejh.net> - 2016-08-10 20:20 +0200
        Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Sonny Rao <sonnyrao@chromium.org> - 2016-08-10 20:50 +0200
      Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps Sonny Rao <sonnyrao@chromium.org> - 2016-08-10 20:30 +0200

csiph-web