|
@@ -9917,6 +9917,13 @@ static int sched_rt_global_constraints(void)
|
|
if (sysctl_sched_rt_period <= 0)
|
|
if (sysctl_sched_rt_period <= 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * There's always some RT tasks in the root group
|
|
|
|
+ * -- migration, kstopmachine etc..
|
|
|
|
+ */
|
|
|
|
+ if (sysctl_sched_rt_runtime == 0)
|
|
|
|
+ return -EBUSY;
|
|
|
|
+
|
|
spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
|
|
spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
|
|
for_each_possible_cpu(i) {
|
|
for_each_possible_cpu(i) {
|
|
struct rt_rq *rt_rq = &cpu_rq(i)->rt;
|
|
struct rt_rq *rt_rq = &cpu_rq(i)->rt;
|