aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2011-10-18 16:03:48 -0400
committerIngo Molnar <mingo@elte.hu>2012-03-01 04:28:02 -0500
commit7abc63b1bd412f7655b62ef3e35c3c11c5134636 (patch)
treec2a18d2b57d71d124ddb280d396df94b7110448f /kernel/sched
parent42c62a589f1ccbf38a02cb732231f9c2fccc5ab0 (diff)
sched/rt: Do not throttle when PI boosting
When a runqueue has rt_runtime_us = 0 then the only way it can accumulate rt_time is via PI boosting. That causes the runqueue to be throttled and replenishing does not change anything due to rt_runtime_us = 0. So avoid that situation by clearing rt_time and skip the throttling alltogether. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> [ Changelog ] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/n/tip-7x70cypsotjb4jvcor3edctk@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/rt.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 6d1eb0be187..7f7e7cdcb47 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -857,8 +857,24 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
857 return 0; 857 return 0;
858 858
859 if (rt_rq->rt_time > runtime) { 859 if (rt_rq->rt_time > runtime) {
860 rt_rq->rt_throttled = 1; 860 struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);
861 printk_once(KERN_WARNING "sched: RT throttling activated\n"); 861
862 /*
863 * Don't actually throttle groups that have no runtime assigned
864 * but accrue some time due to boosting.
865 */
866 if (likely(rt_b->rt_runtime)) {
867 rt_rq->rt_throttled = 1;
868 printk_once(KERN_WARNING "sched: RT throttling activated\n");
869 } else {
870 /*
871 * In case we did anyway, make it go away,
872 * replenishment is a joke, since it will replenish us
873 * with exactly 0 ns.
874 */
875 rt_rq->rt_time = 0;
876 }
877
862 if (rt_rq_throttled(rt_rq)) { 878 if (rt_rq_throttled(rt_rq)) {
863 sched_rt_rq_dequeue(rt_rq); 879 sched_rt_rq_dequeue(rt_rq);
864 return 1; 880 return 1;