Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbbEDMiA (ORCPT ); Mon, 4 May 2015 08:38:00 -0400 Received: from casper.infradead.org ([85.118.1.10]:33886 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751984AbbEDMhw (ORCPT ); Mon, 4 May 2015 08:37:52 -0400 Date: Mon, 4 May 2015 14:37:38 +0200 From: Peter Zijlstra To: Zefan Li Cc: Mike Galbraith , Ingo Molnar , Tejun Heo , LKML , Cgroups Subject: Re: [PATCH] sched: Relax a restriction in sched_rt_can_attach() Message-ID: <20150504123738.GZ21418@twins.programming.kicks-ass.net> References: <5546C34C.7050202@huawei.com> <1430709236.3129.42.camel@gmail.com> <5546F80B.3070802@huawei.com> <1430716247.3129.44.camel@gmail.com> <1430717964.3129.62.camel@gmail.com> <554737AE.5040402@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <554737AE.5040402@huawei.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 33 On Mon, May 04, 2015 at 05:11:10PM +0800, Zefan Li wrote: > Some degree of flexibility is provided so that you may disable some controllers > in a subtree. For example: > > root ---> child1 > (cpuset,memory,cpu) (cpuset,memory) > \ > \-> child2 > (cpu) Uhm, how does that work? Would a task their effective cgroup be the first parent that has a controller enabled? In particular, in your example, if T were part of child1, would its cpu controller be root? > I just realized we allow removing/adding controllers from/to cgroups > while there are tasks in them, which isn't safe unless we eliminate all > can_attach callbacks. We've done so for some cgroup subsystems, but > there are still a few of them... You can't remove can_attach(), we must be able to disallow joining a cgroup. If that results in you not being able to change the cgroup setup with tasks in, so be it -- that seems like a sane restriction anyhow. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/