lkml.org 
[lkml]   [2012]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: RFC [patch] sched,cgroup_sched: convince RT_GROUP_SCHED throttle to work
From
Date
On Sat, 2012-04-07 at 11:54 +0200, Mike Galbraith wrote:

> With this patch, the thing appears to work perfectly, but it doesn't
> look correct, since I'm futzing with ->rt_time where I should not.

s/doesn't look/definitely isn't. This failed the "definitely works so
may live on despite horrific appearance" test anyway, so how about just
stop pretending root isn't global instead?

sched,rt: fix isolated CPUs leaving root_task_group indefinitely throttled

Root task group bandwidth replenishment must service all CPUs regardless of
where it was last started.

Signed-off-by: Mike Galbraith <efault@gmx.de>
---
kernel/sched/rt.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -782,6 +782,19 @@ static int do_sched_rt_period_timer(stru
const struct cpumask *span;

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



\
 
 \ /
  Last update: 2012-04-10 11:11    [from the cache]
©2003-2011 Jasper Spaans