Re: [PATCH] Add file based RSS accounting for memory resourcecontroller (v2)

From: Balbir Singh
Date: Thu Apr 16 2009 - 00:35:27 EST


* Bharata B Rao <bharata.rao@xxxxxxxxx> [2009-04-16 09:29:53]:

> On Thu, Apr 16, 2009 at 7:29 AM, Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Feature: Add file RSS tracking per memory cgroup
> >
> > From: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
> >
> > Changelog v3 -> v2
> > 1. Add corresponding put_cpu() for every get_cpu()
> >
> > Changelog v2 -> v1
> >
> > 1. Rename file_rss to mapped_file
> > 2. Add hooks into mem_cgroup_move_account for updating MAPPED_FILE statistics
> > 3. Use a better name for the statistics routine.
> >
> >
> > We currently don't track file RSS, the RSS we report is actually anon RSS.
> > All the file mapped pages, come in through the page cache and get accounted
> > there. This patch adds support for accounting file RSS pages. It should
> >
> > 1. Help improve the metrics reported by the memory resource controller
> > 2. Will form the basis for a future shared memory accounting heuristic
> >   that has been proposed by Kamezawa.
> >
> > Unfortunately, we cannot rename the existing "rss" keyword used in memory.stat
> > to "anon_rss". We however, add "mapped_file" data and hope to educate the end
> > user through documentation.
> >
> > Signed-off-by: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
>
> Balbir, could you please also update the documentation with the
> description about this new metric ?
>

Yes, I am going to in a follow up patch. I'll send that out after I do
some experimentation with shared memory size heuristics.

--
Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/