From: WU Fengguang <wfg@mail.ustc.edu.cn>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux kernel mailing list <linux-kernel@vger.kernel.org>,
John Berthels <jjberthels@gmail.com>,
Matt Mackall <mpm@selenic.com>
Subject: Re: [PATCH] PSS(proportional set size) accounting in smaps
Date: Tue, 14 Aug 2007 14:51:09 +0800 [thread overview]
Message-ID: <387074269.52680@ustc.edu.cn> (raw)
Message-ID: <20070814065108.GA5524@mail.ustc.edu.cn> (raw)
In-Reply-To: <46C13D43.8070502@linux.vnet.ibm.com>
On Tue, Aug 14, 2007 at 10:57:31AM +0530, Balbir Singh wrote:
> I keep forgetting to check that you are on the cc. My email client
> loves dropping you from the to/cc list.
hehe, sorry for my crappy smtp server ;)
> Fengguang Wu wrote:
> > The "proportional set size" (PSS) of a process is the count of pages it has in
> > memory, where each page is divided by the number of processes sharing it. So if
> > a process has 1000 pages all to itself, and 1000 shared with one other process,
> > its PSS will be 1500.
> > - lwn.net: "ELC: How much memory are applications really using?"
> >
> > The PSS proposed by Matt Mackall is a very nice metic for measuring an process's
> > memory footprint. So collect and export it via /proc/<pid>/smaps.
> >
> > Matt Mackall's pagemap/kpagemap and John Berthels's exmap can also do the job,
> > providing pretty much details. But for PSS, let's do it in a simple way.
> >
> > Cc: Matt Mackall <mpm@selenic.com>
> > Cc: John Berthels <jjberthels@gmail.com>
> > Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
>
> I like the idea of moving towards PSS. I had sent some patches back in December
> last year
>
> http://marc.info/?l=linux-mm&m=116738715329816&w=4
Thank you. That's a pretty comprehensive work.
> > - if (page_mapcount(page) >= 2) {
> > + mapcount = page_mapcount(page);
> > + if (mapcount >= 2) {
>
> This accounting is of-course racy. Mapcount can change any moment.
Sure it is: I never expect to provide accurate numbers.
The mapcount here is to prevent divide-by-zero errors.
> If we are reasonably sure that mapping will not change at the time
> of page_rmap_xxxxx() operations, we could handle shared accounting
> at those points and implement accurate shared accounting.
That would be desirable, if only we can keep the cost low ;)
next prev parent reply other threads:[~2007-08-14 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 5:27 [Fwd: Re: [PATCH] PSS(proportional set size) accounting in smaps] Balbir Singh
2007-08-14 6:51 ` WU Fengguang [this message]
2007-08-14 6:51 ` [PATCH] PSS(proportional set size) accounting in smaps WU Fengguang
-- strict thread matches above, loose matches on Subject: below --
2007-08-14 1:33 Fengguang Wu
2007-08-14 1:33 ` Fengguang Wu
2007-08-14 5:26 ` Balbir Singh
2007-08-14 6:19 ` Matt Mackall
2007-08-15 0:29 ` Fengguang Wu
2007-08-15 0:29 ` Fengguang Wu
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=387074269.52680@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=jjberthels@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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.