summaryrefslogtreecommitdiff
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-03 18:49:24 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-03 18:49:24 (GMT)
commit0c0bd34a142963ca3454f530e47ce1c230d8cc9d (patch)
treee4e933d2c2c27e6820f25d87d00d1f439c28ea44 /kernel/sched/rt.c
parent148b59c60cd4a2745d8f727c2579cffe4a88afd8 (diff)
parentfaa5993736d9b44b508cab4f1f3a77d66641c6f4 (diff)
downloadlinux-0c0bd34a142963ca3454f530e47ce1c230d8cc9d.tar.xz
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar: "Misc fixes, most of them SCHED_DEADLINE fallout" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Prevent rt_time growth to infinity sched/deadline: Switch CPU's presence test order sched/deadline: Cleanup RT leftovers from {inc/dec}_dl_migration sched: Fix double normalization of vruntime
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index a2740b7..1999021 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -538,6 +538,14 @@ static inline struct rt_bandwidth *sched_rt_bandwidth(struct rt_rq *rt_rq)
#endif /* CONFIG_RT_GROUP_SCHED */
+bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
+{
+ struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);
+
+ return (hrtimer_active(&rt_b->rt_period_timer) ||
+ rt_rq->rt_time < rt_b->rt_runtime);
+}
+
#ifdef CONFIG_SMP
/*
* We ran out of runtime, see if we can borrow some from our neighbours.