Lines Matching defs:rt_b
166 static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun);
170 struct rt_bandwidth *rt_b =
178 overrun = hrtimer_forward(timer, now, rt_b->rt_period);
183 idle = do_sched_rt_period_timer(rt_b, overrun);
190 void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime)
192 rt_b->rt_period = ns_to_ktime(period);
193 rt_b->rt_runtime = runtime;
195 raw_spin_lock_init(&rt_b->rt_runtime_lock);
197 hrtimer_init(&rt_b->rt_period_timer,
199 rt_b->rt_period_timer.function = sched_rt_period_timer;
207 static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
211 if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF)
214 if (hrtimer_active(&rt_b->rt_period_timer))
217 raw_spin_lock(&rt_b->rt_runtime_lock);
222 if (hrtimer_active(&rt_b->rt_period_timer))
225 now = hrtimer_cb_get_time(&rt_b->rt_period_timer);
226 hrtimer_forward(&rt_b->rt_period_timer, now, rt_b->rt_period);
228 soft = hrtimer_get_softexpires(&rt_b->rt_period_timer);
229 hard = hrtimer_get_expires(&rt_b->rt_period_timer);
231 __hrtimer_start_range_ns(&rt_b->rt_period_timer, soft, delta,
234 raw_spin_unlock(&rt_b->rt_runtime_lock);
238 static void destroy_rt_bandwidth(struct rt_bandwidth *rt_b)
240 hrtimer_cancel(&rt_b->rt_period_timer);