From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 1/8] cgroup: kill cgroup_subsys->__DEPRECATED_clear_css_refs Date: Wed, 31 Oct 2012 10:22:37 -0700 Message-ID: <20121031172237.GI2945@htj.dyndns.org> References: <1351657365-25055-1-git-send-email-tj@kernel.org> <1351657365-25055-2-git-send-email-tj@kernel.org> <20121031143751.GA22809@dhcp22.suse.cz> <20121031164123.GD2945@htj.dyndns.org> <20121031164855.GI22809@dhcp22.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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=l4fcSwXNQaVspnHUF9iy1Ha3N+iPYmR9rJq5yDVylIU=; b=zidFjjZlbppSKSoVwD9yoR17sgJoyhn6y8hftM+2g0elpzPxeMnc1ssyW7+J42G6PF bF+vf1Wvkx8kY9oqnm71mY84Qbn4G2p2Dfn4JKswldZcXgP/ghkhLxDuZl129aig7+wr 3ZF2NRtO22T+rzI9JkS0zpjjYAFYqlmkQxu48ETLr7LNiZ1K0kZQwzSkbImY64CZzuMJ 0ZmOlP7go+MzYFi5A+R6tJvea0g27YS8JRWruFBctwMlLP/TfAmHWrPhMlPRn8ATmslB XuvXly2Nv0WqrM11en8pTKF83KPqAbmnqcW7pMZ7Bxh2A7+h4R0whhvBBSwTu8jp2ELL 2cPA== Content-Disposition: inline In-Reply-To: <20121031164855.GI22809-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Michal Hocko Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Hey, Michal. On Wed, Oct 31, 2012 at 05:48:55PM +0100, Michal Hocko wrote: > > The WARN_ON_ONCE() is just moved from the original > > cgroup_call_pre_destroy(). We can add an error out there but that > > makes future changes difficult. It's a chicken and egg problem. You > > gotta break the loop somewhere. > > I do not think this is that hard. You can simply change the return path > on pre_destroy error by BUG_ON in "cgroup: deactivate CSS's and mark > cgroup dead before invoking ->pre_destroy()". There is no chicke&egg > problem here because once the group is marked dead and css frozen then > the existing callbacks cannot possibly fail. > Or am I missing your point? I want to be able to move code verbatim in the later patch when relocating ->pre_destroy() invocations. Hmmm... alright, I'll make it break out of pre_destroy() here and change it to WARN_ON_ONCE() later on. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758705Ab2JaRWn (ORCPT ); Wed, 31 Oct 2012 13:22:43 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:43285 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754234Ab2JaRWl (ORCPT ); Wed, 31 Oct 2012 13:22:41 -0400 Date: Wed, 31 Oct 2012 10:22:37 -0700 From: Tejun Heo To: Michal Hocko Cc: lizefan@huawei.com, hannes@cmpxchg.org, bsingharora@gmail.com, kamezawa.hiroyu@jp.fujitsu.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] cgroup: kill cgroup_subsys->__DEPRECATED_clear_css_refs Message-ID: <20121031172237.GI2945@htj.dyndns.org> References: <1351657365-25055-1-git-send-email-tj@kernel.org> <1351657365-25055-2-git-send-email-tj@kernel.org> <20121031143751.GA22809@dhcp22.suse.cz> <20121031164123.GD2945@htj.dyndns.org> <20121031164855.GI22809@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121031164855.GI22809@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, Michal. On Wed, Oct 31, 2012 at 05:48:55PM +0100, Michal Hocko wrote: > > The WARN_ON_ONCE() is just moved from the original > > cgroup_call_pre_destroy(). We can add an error out there but that > > makes future changes difficult. It's a chicken and egg problem. You > > gotta break the loop somewhere. > > I do not think this is that hard. You can simply change the return path > on pre_destroy error by BUG_ON in "cgroup: deactivate CSS's and mark > cgroup dead before invoking ->pre_destroy()". There is no chicke&egg > problem here because once the group is marked dead and css frozen then > the existing callbacks cannot possibly fail. > Or am I missing your point? I want to be able to move code verbatim in the later patch when relocating ->pre_destroy() invocations. Hmmm... alright, I'll make it break out of pre_destroy() here and change it to WARN_ON_ONCE() later on. Thanks. -- tejun