From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Weiner Subject: Re: [PATCH v6 0/9] memcg: per cgroup dirty page accounting Date: Fri, 18 Mar 2011 15:46:51 +0100 Message-ID: <20110318144651.GW2140@cmpxchg.org> References: <20110314202324.GG31120@redhat.com> <20110315184839.GB5740@redhat.com> <20110316131324.GM2140@cmpxchg.org> <20110316215214.GO2140@cmpxchg.org> <20110317124350.GQ2140@cmpxchg.org> <20110318142949.GA19859@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Greg Thelen , Jan Kara , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, containers@lists.osdl.org, linux-fsdevel@vger.kernel.org, Andrea Righi , Balbir Singh , KAMEZAWA Hiroyuki , Daisuke Nishimura , Minchan Kim , Ciju Rajan K , David Rientjes , Wu Fengguang , Chad Talbott , Justin TerAvest , Curt Wohlgemuth To: Vivek Goyal Return-path: Content-Disposition: inline In-Reply-To: <20110318142949.GA19859@redhat.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org 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. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org