Lines Matching refs:tg

136 void free_rt_sched_group(struct task_group *tg)  in free_rt_sched_group()  argument
140 if (tg->rt_se) in free_rt_sched_group()
141 destroy_rt_bandwidth(&tg->rt_bandwidth); in free_rt_sched_group()
144 if (tg->rt_rq) in free_rt_sched_group()
145 kfree(tg->rt_rq[i]); in free_rt_sched_group()
146 if (tg->rt_se) in free_rt_sched_group()
147 kfree(tg->rt_se[i]); in free_rt_sched_group()
150 kfree(tg->rt_rq); in free_rt_sched_group()
151 kfree(tg->rt_se); in free_rt_sched_group()
154 void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq, in init_tg_rt_entry() argument
163 rt_rq->tg = tg; in init_tg_rt_entry()
165 tg->rt_rq[cpu] = rt_rq; in init_tg_rt_entry()
166 tg->rt_se[cpu] = rt_se; in init_tg_rt_entry()
181 int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent) in alloc_rt_sched_group() argument
187 tg->rt_rq = kzalloc(sizeof(rt_rq) * nr_cpu_ids, GFP_KERNEL); in alloc_rt_sched_group()
188 if (!tg->rt_rq) in alloc_rt_sched_group()
190 tg->rt_se = kzalloc(sizeof(rt_se) * nr_cpu_ids, GFP_KERNEL); in alloc_rt_sched_group()
191 if (!tg->rt_se) in alloc_rt_sched_group()
194 init_rt_bandwidth(&tg->rt_bandwidth, in alloc_rt_sched_group()
209 rt_rq->rt_runtime = tg->rt_bandwidth.rt_runtime; in alloc_rt_sched_group()
210 init_tg_rt_entry(tg, rt_rq, rt_se, i, parent->rt_se[i]); in alloc_rt_sched_group()
249 void free_rt_sched_group(struct task_group *tg) { } in free_rt_sched_group() argument
251 int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent) in alloc_rt_sched_group() argument
433 if (!rt_rq->tg) in sched_rt_runtime()
441 return ktime_to_ns(rt_rq->tg->rt_bandwidth.rt_period); in sched_rt_period()
446 static inline struct task_group *next_task_group(struct task_group *tg) in next_task_group() argument
449 tg = list_entry_rcu(tg->list.next, in next_task_group()
451 } while (&tg->list != &task_groups && task_group_is_autogroup(tg)); in next_task_group()
453 if (&tg->list == &task_groups) in next_task_group()
454 tg = NULL; in next_task_group()
456 return tg; in next_task_group()
483 rt_se = rt_rq->tg->rt_se[cpu]; in sched_rt_rq_enqueue()
501 rt_se = rt_rq->tg->rt_se[cpu]; in sched_rt_rq_dequeue()
546 return &rt_rq->tg->rt_bandwidth; in sched_rt_bandwidth()
1104 if (rt_rq->tg) in inc_rt_group()
1105 start_rt_bandwidth(&rt_rq->tg->rt_bandwidth); in inc_rt_group()