Commit 7abc63b1bd412f7655b62ef3e35c3c11c5134636
Committed by
Ingo Molnar
1 parent
42c62a589f
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 18 additions and 2 deletions Side-by-side Diff
kernel/sched/rt.c
... | ... | @@ -857,8 +857,24 @@ |
857 | 857 | return 0; |
858 | 858 | |
859 | 859 | if (rt_rq->rt_time > runtime) { |
860 | - rt_rq->rt_throttled = 1; | |
861 | - printk_once(KERN_WARNING "sched: RT throttling activated\n"); | |
860 | + struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq); | |
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 | 878 | if (rt_rq_throttled(rt_rq)) { |
863 | 879 | sched_rt_rq_dequeue(rt_rq); |
864 | 880 | return 1; |