From patchwork Mon Feb 8 12:45:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 61408 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1414679lbl; Mon, 8 Feb 2016 04:45:24 -0800 (PST) X-Received: by 10.98.73.149 with SMTP id r21mr42429908pfi.140.1454935524421; Mon, 08 Feb 2016 04:45:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj3si6730957pac.243.2016.02.08.04.45.24; Mon, 08 Feb 2016 04:45:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431AbcBHMpT (ORCPT + 30 others); Mon, 8 Feb 2016 07:45:19 -0500 Received: from foss.arm.com ([217.140.101.70]:60461 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753360AbcBHMpJ (ORCPT ); Mon, 8 Feb 2016 07:45:09 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5760D3FB; Mon, 8 Feb 2016 04:44:23 -0800 (PST) Received: from e106622-lin.cambridge.arm.com (e106622-lin.cambridge.arm.com [10.1.208.152]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 497DB3F25F; Mon, 8 Feb 2016 04:45:08 -0800 (PST) From: Juri Lelli To: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, luca.abeni@unitn.it, vincent.guittot@linaro.org, wanpeng.li@hotmail.com, juri.lelli@arm.com Subject: [PATCH 2/2] sched/deadline: rq_{online, offline}_dl for root_domain changes Date: Mon, 8 Feb 2016 12:45:31 +0000 Message-Id: <1454935531-7541-3-git-send-email-juri.lelli@arm.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454935531-7541-1-git-send-email-juri.lelli@arm.com> References: <1454935531-7541-1-git-send-email-juri.lelli@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Steven Rostedt reported that we lose information about the amount of bandwidth that has been admitted to the system across operations that reconfigure scheduling domains (and are thus destructive w.r.t. root domains). Wanpeng Li also previously reported a similar problem related to hotplug, but, since hotplug operations entail scheduling domains reconfiguration, we can fix both problems at once. This patch leverages per-rq admitted bandwidth information introduced by previous commit and couple that with rq_{online,offline}_dl calls to save and restore root_domain state across scheduling domains reconfiguration. Cc: Ingo Molnar Cc: Peter Zijlstra Reported-by: Wanpeng Li Reported-by: Steven Rostedt Signed-off-by: Juri Lelli --- kernel/sched/deadline.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.0 diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 2480cab..925814e 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1683,6 +1683,7 @@ static void rq_online_dl(struct rq *rq) if (rq->dl.overloaded) dl_set_overload(rq); + __dl_add(&rq->rd->dl_bw, rq->dl.ac_bw); cpudl_set_freecpu(&rq->rd->cpudl, rq->cpu); if (rq->dl.dl_nr_running > 0) cpudl_set(&rq->rd->cpudl, rq->cpu, rq->dl.earliest_dl.curr, 1); @@ -1696,6 +1697,7 @@ static void rq_offline_dl(struct rq *rq) cpudl_set(&rq->rd->cpudl, rq->cpu, 0, 0); cpudl_clear_freecpu(&rq->rd->cpudl, rq->cpu); + __dl_clear(&rq->rd->dl_bw, rq->dl.ac_bw); } void __init init_sched_dl_class(void)