diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-05-05 11:50:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-05 14:07:57 -0400 |
commit | 60aa605dfce2976e54fa76e805ab0f221372d4d9 (patch) | |
tree | 097a6ddd4127039f79e36a2e9100b653551d997d /kernel/sched.c | |
parent | 6e29ec5701e9d44fa02b96c1c5c45f7516182b65 (diff) |
sched: rt: document the risk of small values in the bandwidth settings
Thomas noted that we should disallow sysctl_sched_rt_runtime == 0 for
(!RT_GROUP) since the root group always has some RT tasks in it.
Further, update the documentation to inspire clue.
[ Impact: exclude corner-case sysctl_sched_rt_runtime value ]
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090505155436.863098054@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 54d67b94f1a9..2a43a581ead3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -9917,6 +9917,13 @@ static int sched_rt_global_constraints(void) | |||
9917 | if (sysctl_sched_rt_period <= 0) | 9917 | if (sysctl_sched_rt_period <= 0) |
9918 | return -EINVAL; | 9918 | return -EINVAL; |
9919 | 9919 | ||
9920 | /* | ||
9921 | * There's always some RT tasks in the root group | ||
9922 | * -- migration, kstopmachine etc.. | ||
9923 | */ | ||
9924 | if (sysctl_sched_rt_runtime == 0) | ||
9925 | return -EBUSY; | ||
9926 | |||
9920 | spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags); | 9927 | spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags); |
9921 | for_each_possible_cpu(i) { | 9928 | for_each_possible_cpu(i) { |
9922 | struct rt_rq *rt_rq = &cpu_rq(i)->rt; | 9929 | struct rt_rq *rt_rq = &cpu_rq(i)->rt; |