Lines Matching refs:td
102 struct throtl_data *td; member
195 static inline struct throtl_grp *td_root_tg(struct throtl_data *td) in td_root_tg() argument
197 return blkg_to_tg(td->queue->root_blkg); in td_root_tg()
227 return tg->td; in sq_to_td()
409 struct throtl_data *td = blkg->q->td; in throtl_pd_init() local
427 parent_sq = &td->service_queue; in throtl_pd_init()
440 tg->td = td; in throtl_pd_init()
512 static struct throtl_grp *throtl_lookup_tg(struct throtl_data *td, in throtl_lookup_tg() argument
520 return td_root_tg(td); in throtl_lookup_tg()
522 return blkg_to_tg(blkg_lookup(blkcg, td->queue)); in throtl_lookup_tg()
525 static struct throtl_grp *throtl_lookup_create_tg(struct throtl_data *td, in throtl_lookup_create_tg() argument
528 struct request_queue *q = td->queue; in throtl_lookup_create_tg()
536 tg = td_root_tg(td); in throtl_lookup_create_tg()
546 tg = td_root_tg(td); in throtl_lookup_create_tg()
1110 BUG_ON(tg->td->nr_queued[rw] <= 0); in tg_dispatch_one_bio()
1111 tg->td->nr_queued[rw]--; in tg_dispatch_one_bio()
1200 struct throtl_data *td = sq_to_td(sq); in throtl_pending_timer_fn() local
1201 struct request_queue *q = td->queue; in throtl_pending_timer_fn()
1247 queue_work(kthrotld_workqueue, &td->dispatch_work); in throtl_pending_timer_fn()
1263 struct throtl_data *td = container_of(work, struct throtl_data, in blk_throtl_dispatch_work_fn() local
1265 struct throtl_service_queue *td_sq = &td->service_queue; in blk_throtl_dispatch_work_fn()
1266 struct request_queue *q = td->queue; in blk_throtl_dispatch_work_fn()
1465 struct throtl_data *td = q->td; in throtl_shutdown_wq() local
1467 cancel_work_sync(&td->dispatch_work); in throtl_shutdown_wq()
1482 struct throtl_data *td = q->td; in blk_throtl_bio() local
1501 tg = throtl_lookup_tg(td, blkcg); in blk_throtl_bio()
1515 tg = throtl_lookup_create_tg(td, blkcg); in blk_throtl_bio()
1566 tg->td->nr_queued[rw]++; in blk_throtl_bio()
1627 struct throtl_data *td = q->td; in blk_throtl_drain() local
1642 blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) in blk_throtl_drain()
1646 tg_drain_bios(&td->service_queue); in blk_throtl_drain()
1653 while ((bio = throtl_pop_queued(&td->service_queue.queued[rw], in blk_throtl_drain()
1662 struct throtl_data *td; in blk_throtl_init() local
1665 td = kzalloc_node(sizeof(*td), GFP_KERNEL, q->node); in blk_throtl_init()
1666 if (!td) in blk_throtl_init()
1669 INIT_WORK(&td->dispatch_work, blk_throtl_dispatch_work_fn); in blk_throtl_init()
1670 throtl_service_queue_init(&td->service_queue, NULL); in blk_throtl_init()
1672 q->td = td; in blk_throtl_init()
1673 td->queue = q; in blk_throtl_init()
1678 kfree(td); in blk_throtl_init()
1684 BUG_ON(!q->td); in blk_throtl_exit()
1687 kfree(q->td); in blk_throtl_exit()