From mboxrd@z Thu Jan 1 00:00:00 1970 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH v3 1/2] cgroup: pass struct mem_cgroup instead of struct cgroup to socket memcg Date: Tue, 10 Apr 2012 11:42:52 +0900 Message-ID: <4F839E2C.20000@jp.fujitsu.com> References: <1334010994-23301-1-git-send-email-glommer@parallels.com> <1334010994-23301-2-git-send-email-glommer@parallels.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1334010994-23301-2-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Glauber Costa Cc: Tejun Heo , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Li Zefan , Johannes Weiner , Michal Hocko (2012/04/10 7:36), Glauber Costa wrote: > The only reason cgroup was used, was to be consistent with the populate() > interface. Now that we're getting rid of it, not only we no longer need > it, but we also *can't* call it this way. > > Since we will no longer rely on populate(), this will be called from > create(). During create, the association between struct mem_cgroup > and struct cgroup does not yet exist, since cgroup internals hasn't > yet initialized its bookkeeping. This means we would not be able > to draw the memcg pointer from the cgroup pointer in these > functions, which is highly undesirable. > > Signed-off-by: Glauber Costa > CC: Tejun Heo > CC: Li Zefan > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Michal Hocko Acked-by: KAMEZAWA Hiroyuki