From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 3/7] memcg: move charges to root at rmdir() Date: Mon, 16 Apr 2012 15:30:12 -0700 Message-ID: <20120416223012.GD12421@google.com> References: <4F86B9BE.8000105@jp.fujitsu.com> <4F86BB02.2060607@jp.fujitsu.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0bGLclZh2u05b/O6CbrFpFhZovK/IQL3aH70iaG0Jgw=; b=nzJ66LWWlUefaEIvWLMkt4nkpspPUMPy9F2dR5lBbAjkHgmZOgmFMptO+6f6aEwwDp YK15BFhN9p6hC6kKVBnoVjwHcjrYakbmW4G0nmrga++rflhtC2oer5O823HrN+ofNZia FhWgfqQf7oBxsiUpkDtAFyYSHmabEYY+bhyxlQCamN5+hWh6Lym2Ck5twP3bhCvMdTgM ZuuLYNcYwQNhaBEJvMaSnhb4QNGzULiYhWNKhaD2rm01BFJ/w924VQ/AFLXz+w2vckDN 29wqLKnGu7Ao7HSpkdVdqEwb5YnR88JhHkyjDDAa5J43DD6+twcr7buvv8XQtAywmW0t 97kw== Content-Disposition: inline In-Reply-To: <4F86BB02.2060607-+CUm20s59erQFUHtdCDX3A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: KAMEZAWA Hiroyuki Cc: "linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org" , "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Michal Hocko , Johannes Weiner , Glauber Costa , Hugh Dickins , Andrew Morton Hello, On Thu, Apr 12, 2012 at 08:22:42PM +0900, KAMEZAWA Hiroyuki wrote: > As recently discussed, Tejun Heo, the cgroup maintainer, tries to > remove ->pre_destroy() and cgroup will never return -EBUSY at rmdir(). I'm not trying to remove ->pre_destory() per-se. I want to remove css ref draining and ->pre_destroy() vetoing cgroup removal. Probably better wording would be "tries to simplify removal path such that removal always succeeds". > To do that, in memcg, handling case of use_hierarchy==false is a problem. > > We move memcg's charges to its parent at rmdir(). If use_hierarchy==true, > it's already accounted in the parent, no problem. If use_hierarchy==false, > we cannot guarantee we can move all charges to the parent. > > This patch changes the behavior to move all charges to root_mem_cgroup > if use_hierarchy=false. It seems this matches semantics of use_hierarchy==false,which means parent and child has no hierarchical relationship. Maybe better to break the above line? Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx128.postini.com [74.125.245.128]) by kanga.kvack.org (Postfix) with SMTP id 9BA206B0044 for ; Mon, 16 Apr 2012 18:30:17 -0400 (EDT) Received: by dakh32 with SMTP id h32so8031412dak.9 for ; Mon, 16 Apr 2012 15:30:16 -0700 (PDT) Date: Mon, 16 Apr 2012 15:30:12 -0700 From: Tejun Heo Subject: Re: [PATCH 3/7] memcg: move charges to root at rmdir() Message-ID: <20120416223012.GD12421@google.com> References: <4F86B9BE.8000105@jp.fujitsu.com> <4F86BB02.2060607@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F86BB02.2060607@jp.fujitsu.com> Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Glauber Costa , Hugh Dickins , Andrew Morton Hello, On Thu, Apr 12, 2012 at 08:22:42PM +0900, KAMEZAWA Hiroyuki wrote: > As recently discussed, Tejun Heo, the cgroup maintainer, tries to > remove ->pre_destroy() and cgroup will never return -EBUSY at rmdir(). I'm not trying to remove ->pre_destory() per-se. I want to remove css ref draining and ->pre_destroy() vetoing cgroup removal. Probably better wording would be "tries to simplify removal path such that removal always succeeds". > To do that, in memcg, handling case of use_hierarchy==false is a problem. > > We move memcg's charges to its parent at rmdir(). If use_hierarchy==true, > it's already accounted in the parent, no problem. If use_hierarchy==false, > we cannot guarantee we can move all charges to the parent. > > This patch changes the behavior to move all charges to root_mem_cgroup > if use_hierarchy=false. It seems this matches semantics of use_hierarchy==false,which means parent and child has no hierarchical relationship. Maybe better to break the above line? Thanks. -- tejun -- 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