Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755740AbcDGKnI (ORCPT ); Thu, 7 Apr 2016 06:43:08 -0400 Received: from casper.infradead.org ([85.118.1.10]:57458 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754880AbcDGKnE (ORCPT ); Thu, 7 Apr 2016 06:43:04 -0400 Date: Thu, 7 Apr 2016 12:42:59 +0200 From: Peter Zijlstra To: Johannes Weiner Cc: Tejun Heo , torvalds@linux-foundation.org, akpm@linux-foundation.org, mingo@redhat.com, lizefan@huawei.com, pjt@google.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-api@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource group and PRIO_RGRP Message-ID: <20160407104259.GQ3430@twins.programming.kicks-ass.net> References: <1457710888-31182-1-git-send-email-tj@kernel.org> <20160314113013.GM6344@twins.programming.kicks-ass.net> <20160406155830.GI24661@htj.duckdns.org> <20160407064549.GH3430@twins.programming.kicks-ass.net> <20160407073547.GA12560@cmpxchg.org> <20160407080833.GK3430@twins.programming.kicks-ass.net> <20160407092824.GA13839@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160407092824.GA13839@cmpxchg.org> 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: 826 Lines: 27 On Thu, Apr 07, 2016 at 05:28:24AM -0400, Johannes Weiner wrote: > Hm? The root group can always contain tasks. It's not the only thing > the root is exempt from, it can't control any resources either: it does in fact control resouces; the hierarchy directly affects the proportional distribution of time. > sched_group_set_shares(): > > /* > * We can't change the weight of the root cgroup. > */ > if (!tg->se[0]) > return -EINVAL; The root has, per definition, no siblings, so setting a weight is entirely pointless. > tg_set_cfs_bandwidth(): > > if (tg == &root_task_group) > return -EINVAL; > We have had patches to implement this, but have so far held off because they add a bunch of cycles to some really hot paths and we'd rather not do that. Its not impossible, or unthinkable to do this otherwise.