From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993117AbbEEOMC (ORCPT ); Tue, 5 May 2015 10:12:02 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:48248 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2993081AbbEEOLE (ORCPT ); Tue, 5 May 2015 10:11:04 -0400 Date: Tue, 5 May 2015 16:10:49 +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: <20150505141049.GN21418@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> <20150504123738.GZ21418@twins.programming.kicks-ass.net> <55483EF7.7070905@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55483EF7.7070905@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 On Tue, May 05, 2015 at 11:54:31AM +0800, Zefan Li wrote: > But I was wondering if we can change the default value of cpu.rt_runtime_us > from 0 to -1? So by default the RT tasks can be attached to a newly-created > cgroup without users having to make any configuration, and those tasks are > confined by the parent cgroup, which is what we have with cfs bw control. > This require some changes to the code, but I guess it's do-able? Its tricky. Imagine: root / \ A B / \ / \ a1 a2 b1 b2 Now if they all have -1, I cannot set a bw on any except the leaf nodes ([ab][12]). Because the sum of child bw must strictly be smaller or equal to the parent bandwidth, and -1 if effective inf. Similarly, if A has bw enabled I cannot create a new child with -1. Because above. Now you can kludge around some of this, for example you can make the default depend on the parent setting etc.. But that's horribly inconsistent. So I really prefer not to go that way; if people use RR/FIFO they had better bloody know what they're doing; which includes setting up the system. The whole RR/FIFO thing is so enormously broken (by definition; this truly is unfixable) that you simply _cannot_ automate it.