Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761472AbbBJB0h (ORCPT ); Mon, 9 Feb 2015 20:26:37 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:1175 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755937AbbBJB0f (ORCPT ); Mon, 9 Feb 2015 20:26:35 -0500 Message-ID: <54D95E3E.20207@huawei.com> Date: Tue, 10 Feb 2015 09:26:22 +0800 From: Zefan Li User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Peter Zijlstra CC: Ingo Molnar , Mike Galbraith , LKML , Stefan Bader Subject: Re: [PATCH] sched, autogroup: Fix failure when writing to cpu.rt_runtime_us References: <54D32AD4.1060003@huawei.com> <20150205142527.GI5029@twins.programming.kicks-ass.net> <54D4194B.2040808@huawei.com> <20150206105840.GJ23123@twins.programming.kicks-ass.net> <54D5B873.5030208@huawei.com> <20150209112237.GR5029@twins.programming.kicks-ass.net> In-Reply-To: <20150209112237.GR5029@twins.programming.kicks-ass.net> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.18.230] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1503 Lines: 37 > Subject: sched, autogroup: Fix failure to set cpu.rt_runtime_us > From: Peter Zijlstra > Date: Mon Feb 9 11:53:18 CET 2015 > > Because task_group() uses a cache of autogroup_task_group(), whoes > output depends on sched_class, switching classes can generate > problems. > > In particular, when started as fair, the cache points to the > autogroup, so when switching to RT the tg_rt_schedulable() test fails > for every cpu.rt_{runtime,period}_us change because now the autogroup > has tasks and no runtime. > > Furthermore, going back to the previous semantics of varying > task_group() with sched_class has the down-side that the sched_debug > output varies as well, even though the task really is in the > autogroup. > > Therefore add an autogroup exception to tg_has_rt_tasks() -- such that > both (all) task_group() usages in sched/core now have one. And remove > all the remnants of the variable task_group() output. > > Cc: Mike Galbraith > Cc: Stefan Bader > Reported-by: Zefan Li > Fixes: 8323f26ce342 ("sched: Fix race in task_group()") > Signed-off-by: Peter Zijlstra (Intel) Both patches look good to me. Thanks! -- 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/