From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 06/10] cgroup: convert memcg controller to the new cftype interface Date: Mon, 19 Mar 2012 09:15:07 -0700 Message-ID: <20120319161507.GD11069@google.com> References: <1331940963-15756-1-git-send-email-tj@kernel.org> <1331940963-15756-7-git-send-email-tj@kernel.org> <4F66B55A.8020307@jp.fujitsu.com> <4F670DC2.1030904@parallels.com> 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=yuyyToV7zRtu8MOHrBKfXHNleB+Ylh8vXBYMAsaktQ4=; b=r3M/J7QbbTJJIcCsWtU3A7KqeEe2r3a7W/QUZGidqA6YCUkw3pqiBGIbhNW6WiNmdO 1UB0u0wIdDBwF/eR2m3mbpC0q4V69Psoxl4G7fKG7IGSY6B8jt/+/5TXXBL0MFISSY1l VAZBDN+6wafDTJvF/PQax2OBF1z3dzBXJUY5iMrRd25bQoZ5eUVedglmyOSuCKij1SPq D2P1OBJh4x0zif/7ygl2iEJybkd1oHvKIX7WAbpFsU8MnednzRZlyUnjsMwv9eQ1FYaL TbnETuMbCCFxmvaydqtesCKQpm16k31WnkKJOa6LZWsilTKlxrvAvxWTFDTWUrErH37e lx9g== Content-Disposition: inline In-Reply-To: <4F670DC2.1030904-bzQdu9zFT3WakBO8gow8eQ@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: Glauber Costa Cc: ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michal Hocko , Hugh Dickins , Johannes Weiner , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hey, On Mon, Mar 19, 2012 at 02:43:14PM +0400, Glauber Costa wrote: > I am still in the middle of the review. Is it possible to dynamically > register entries? (right now, I mean) Before the patchset, no. After the patchset, yes. > If yes - which seems to be a bit of the point of the exercise, so it > should be totally okay from my PoV. I have that call in populate because > which files will be created depends on which protocols you have registered. > > The trick here, is that doesn't need to happen at all cgroup creations. > But it can't happen at root's either, because this is quite fragile: > some protocols may only be registered after root memcg is created. Yeah, it can happen anytime but it shouldn't be called from ->create() or other callbacks which are invoked under cgroup_mutex. We can provide an alternative interface or other locking trickery to avoid this, but I don't think I'll take that path unless there are very strong rationale. 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 S1161891Ab2CSQPS (ORCPT ); Mon, 19 Mar 2012 12:15:18 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:39089 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161633Ab2CSQPM (ORCPT ); Mon, 19 Mar 2012 12:15:12 -0400 Date: Mon, 19 Mar 2012 09:15:07 -0700 From: Tejun Heo To: Glauber Costa Cc: KAMEZAWA Hiroyuki , lizf@cn.fujitsu.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, rni@google.com, ctalbott@google.com, Johannes Weiner , Michal Hocko , Balbir Singh , Hugh Dickins , Greg Thelen Subject: Re: [PATCH 06/10] cgroup: convert memcg controller to the new cftype interface Message-ID: <20120319161507.GD11069@google.com> References: <1331940963-15756-1-git-send-email-tj@kernel.org> <1331940963-15756-7-git-send-email-tj@kernel.org> <4F66B55A.8020307@jp.fujitsu.com> <4F670DC2.1030904@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F670DC2.1030904@parallels.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, On Mon, Mar 19, 2012 at 02:43:14PM +0400, Glauber Costa wrote: > I am still in the middle of the review. Is it possible to dynamically > register entries? (right now, I mean) Before the patchset, no. After the patchset, yes. > If yes - which seems to be a bit of the point of the exercise, so it > should be totally okay from my PoV. I have that call in populate because > which files will be created depends on which protocols you have registered. > > The trick here, is that doesn't need to happen at all cgroup creations. > But it can't happen at root's either, because this is quite fragile: > some protocols may only be registered after root memcg is created. Yeah, it can happen anytime but it shouldn't be called from ->create() or other callbacks which are invoked under cgroup_mutex. We can provide an alternative interface or other locking trickery to avoid this, but I don't think I'll take that path unless there are very strong rationale. Thanks. -- tejun