lkml.org 
[lkml]   [2011]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 0/9] memcg: per cgroup dirty page accounting
On Fri, Mar 18, 2011 at 10:29:50AM -0400, Vivek Goyal wrote:
> On Thu, Mar 17, 2011 at 01:43:50PM +0100, Johannes Weiner wrote:
>
> [..]
> > So structures roughly like this:
> >
> > struct mem_cgroup {
> > ...
> > /* key is struct backing_dev_info * */
> > struct rb_root memcg_bdis;
> > };
> >
> > struct memcg_bdi {
> > /* key is struct address_space * */
> > struct rb_root memcg_mappings;
> > struct rb_node node;
> > };
> >
> > struct memcg_mapping {
> > struct address_space *mapping;
> > struct mem_cgroup *memcg;
> > struct rb_node node;
> > atomic_t count;
> > };
> >
> > struct page_cgroup {
> > ...
> > struct memcg_mapping *memcg_mapping;
> > };
>
> Johannes, didn't you want page->mapping to point to memcg_mapping instead
> of increasing the size of page_cgroup?

Initially, yes, but this is far less invasive. We don't increase
page_cgroup, though: memcg_mapping contains the pointer to struct
mem_cgroup, it can replace pc->memcg for now.


\
 
 \ /
  Last update: 2011-03-18 15:49    [W:0.077 / U:3.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site