X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Fsched%2Frt.c;h=1999021042c7010c6e5e86539b9c0b9a03519dcd;hb=632b06aa2842b12c6d6a510ec080fb6ebdb38ea5;hp=a2740b775b456ed27c56ad088007c83e1873458b;hpb=00e674702438b8b2abc9dd6b8b49d54a3e99baa7;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.