X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Fsched%2Frt.c;fp=kernel%2Fsched%2Frt.c;h=1999021042c7010c6e5e86539b9c0b9a03519dcd;hb=faa5993736d9b44b508cab4f1f3a77d66641c6f4;hp=a2740b775b456ed27c56ad088007c83e1873458b;hpb=eec751ed41a0ae7e92a43c33a458d7bd1b941631;p=~andy%2Flinux diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index a2740b775b4..1999021042c 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.