summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Galbraith <efault@gmx.de>2012-08-07 10:02:38 +0200
committerBen Hutchings <ben@decadent.org.uk>2014-02-15 19:20:17 +0000
commitaee1f8b87e203b0525f340d2fde94f5a82f6c4bd (patch)
treed846bcff1691caed3603f104b5e3f929f90f7ab2
parent13d8ff3f710fae656eb7c5648c1efce749bf8b52 (diff)
sched,rt: fix isolated CPUs leaving root_task_group indefinitely throttled
commit e221d028bb08b47e624c5f0a31732c642db9d19a upstream. Root task group bandwidth replenishment must service all CPUs, regardless of where the timer was last started, and regardless of the isolation mechanism, lest 'Quoth the Raven, "Nevermore"' become rt scheduling policy. Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1344326558.6968.25.camel@marge.simpson.net Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [bwh: Backported to 3.2: adjust filename] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--kernel/sched_rt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index ba756ab688a8..d0fff8139377 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -587,6 +587,19 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
return 1;
span = sched_rt_period_mask();
+#ifdef CONFIG_RT_GROUP_SCHED
+ /*
+ * FIXME: isolated CPUs should really leave the root task group,
+ * whether they are isolcpus or were isolated via cpusets, lest
+ * the timer run on a CPU which does not service all runqueues,
+ * potentially leaving other CPUs indefinitely throttled. If
+ * isolation is really required, the user will turn the throttle
+ * off to kill the perturbations it causes anyway. Meanwhile,
+ * this maintains functionality for boot and/or troubleshooting.
+ */
+ if (rt_b == &root_task_group.rt_bandwidth)
+ span = cpu_online_mask;
+#endif
for_each_cpu(i, span) {
int enqueue = 0;
struct rt_rq *rt_rq = sched_rt_period_rt_rq(rt_b, i);