Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1329012

[PATCH 2/2] sched/deadline: rq_{online,offline}_dl for root_domain changes

From Juri Lelli <juri.lelli@arm.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] sched/deadline: rq_{online,offline}_dl for root_domain changes
Date 2016-02-08 13:50 +0100
Message-ID <qZTqr-5fX-37@gated-at.bofh.it> (permalink)
References <qZTqq-5fX-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reported-by: Wanpeng Li <wanpeng.li@hotmail.com>
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
---
 kernel/sched/deadline.c | 2 ++
 1 file changed, 2 insertions(+)

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)
-- 
2.7.0

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] sched/deadline: fix cpusets bandwidth accounting Juri Lelli <juri.lelli@arm.com> - 2016-02-08 13:50 +0100
  [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth Juri Lelli <juri.lelli@arm.com> - 2016-02-08 13:50 +0100
  [PATCH 2/2] sched/deadline: rq_{online,offline}_dl for root_domain changes Juri Lelli <juri.lelli@arm.com> - 2016-02-08 13:50 +0100

csiph-web