From efe174db9760e6ea68a8b81f7f4208f7e7238930 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Tue, 18 Oct 2011 22:03:48 +0200 Subject: [PATCH] --- yaml --- r: 288749 b: refs/heads/master c: 7abc63b1bd412f7655b62ef3e35c3c11c5134636 h: refs/heads/master i: 288747: 0928df54e209149d4f1c255c2baa9718c41d3d48 v: v3 --- [refs] | 2 +- trunk/kernel/sched/rt.c | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 94093dd6b780..81005eb40ce4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 42c62a589f1ccbf38a02cb732231f9c2fccc5ab0 +refs/heads/master: 7abc63b1bd412f7655b62ef3e35c3c11c5134636 diff --git a/trunk/kernel/sched/rt.c b/trunk/kernel/sched/rt.c index 6d1eb0be1870..7f7e7cdcb472 100644 --- a/trunk/kernel/sched/rt.c +++ b/trunk/kernel/sched/rt.c @@ -857,8 +857,24 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) return 0; if (rt_rq->rt_time > runtime) { - rt_rq->rt_throttled = 1; - printk_once(KERN_WARNING "sched: RT throttling activated\n"); + struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq); + + /* + * Don't actually throttle groups that have no runtime assigned + * but accrue some time due to boosting. + */ + if (likely(rt_b->rt_runtime)) { + rt_rq->rt_throttled = 1; + printk_once(KERN_WARNING "sched: RT throttling activated\n"); + } else { + /* + * In case we did anyway, make it go away, + * replenishment is a joke, since it will replenish us + * with exactly 0 ns. + */ + rt_rq->rt_time = 0; + } + if (rt_rq_throttled(rt_rq)) { sched_rt_rq_dequeue(rt_rq); return 1;