Lines Matching refs:bfqd
227 if (!(bfqq == ((struct bfq_data *)bfqg->bfqd)->in_service_queue)) in bfqg_stats_update_io_add()
314 bfqq->bfqd->root_group; in bfqq_group()
544 struct bfq_data *bfqd = blkg->q->elevator->elevator_data; in bfq_pd_init() local
554 bfqg->bfqd = bfqd; in bfq_pd_init()
585 static void bfq_link_bfqg(struct bfq_data *bfqd, struct bfq_group *bfqg) in bfq_link_bfqg() argument
599 if (curr_bfqg != bfqd->root_group) { in bfq_link_bfqg()
602 parent = bfqd->root_group; in bfq_link_bfqg()
608 struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio) in bfq_bio_bfqg() argument
626 &bfqg_to_blkg(bfqd->root_group)->blkcg->css); in bfq_bio_bfqg()
627 return bfqd->root_group; in bfq_bio_bfqg()
644 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, in bfq_bfqq_move() argument
653 if (bfqq == &bfqd->oom_bfqq) in bfq_bfqq_move()
667 if (bfqq == bfqd->in_service_queue) in bfq_bfqq_move()
668 bfq_bfqq_expire(bfqd, bfqd->in_service_queue, in bfq_bfqq_move()
672 bfq_deactivate_bfqq(bfqd, bfqq, false, false); in bfq_bfqq_move()
683 if (unlikely(!bfqd->nonrot_with_queueing)) in bfq_bfqq_move()
684 bfq_pos_tree_add_move(bfqd, bfqq); in bfq_bfqq_move()
685 bfq_activate_bfqq(bfqd, bfqq); in bfq_bfqq_move()
688 if (!bfqd->in_service_queue && !bfqd->rq_in_driver) in bfq_bfqq_move()
689 bfq_schedule_dispatch(bfqd); in bfq_bfqq_move()
704 static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd, in __bfq_bic_change_cgroup() argument
717 bfq_release_process_ref(bfqd, async_bfqq); in __bfq_bic_change_cgroup()
725 bfq_bfqq_move(bfqd, sync_bfqq, bfqg); in __bfq_bic_change_cgroup()
751 bfq_release_process_ref(bfqd, sync_bfqq); in __bfq_bic_change_cgroup()
762 struct bfq_data *bfqd = bic_to_bfqd(bic); in bfq_bic_update_cgroup() local
763 struct bfq_group *bfqg = bfq_bio_bfqg(bfqd, bio); in bfq_bic_update_cgroup()
772 if (unlikely(!bfqd) || likely(bic->blkcg_serial_nr == serial_nr)) in bfq_bic_update_cgroup()
779 bfq_link_bfqg(bfqd, bfqg); in bfq_bic_update_cgroup()
780 __bfq_bic_change_cgroup(bfqd, bic, bfqg); in bfq_bic_update_cgroup()
853 static void bfq_reparent_leaf_entity(struct bfq_data *bfqd, in bfq_reparent_leaf_entity() argument
873 bfq_bfqq_move(bfqd, bfqq, bfqd->root_group); in bfq_reparent_leaf_entity()
882 static void bfq_reparent_active_queues(struct bfq_data *bfqd, in bfq_reparent_active_queues() argument
891 bfq_reparent_leaf_entity(bfqd, entity, ioprio_class); in bfq_reparent_active_queues()
894 bfq_reparent_leaf_entity(bfqd, in bfq_reparent_active_queues()
911 struct bfq_data *bfqd = bfqg->bfqd; in bfq_pd_offline() local
916 spin_lock_irqsave(&bfqd->lock, flags); in bfq_pd_offline()
940 bfq_reparent_active_queues(bfqd, bfqg, st, i); in bfq_pd_offline()
959 bfq_put_async_queues(bfqd, bfqg); in bfq_pd_offline()
962 spin_unlock_irqrestore(&bfqd->lock, flags); in bfq_pd_offline()
972 void bfq_end_wr_async(struct bfq_data *bfqd) in bfq_end_wr_async() argument
976 list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) { in bfq_end_wr_async()
979 bfq_end_wr_async_queues(bfqd, bfqg); in bfq_end_wr_async()
981 bfq_end_wr_async_queues(bfqd, bfqd->root_group); in bfq_end_wr_async()
1262 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) in bfq_create_group_hierarchy() argument
1266 ret = blkcg_activate_policy(bfqd->queue, &blkcg_policy_bfq); in bfq_create_group_hierarchy()
1270 return blkg_to_bfqg(bfqd->queue->root_blkg); in bfq_create_group_hierarchy()
1427 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, in bfq_bfqq_move() argument
1445 void bfq_end_wr_async(struct bfq_data *bfqd) in bfq_end_wr_async() argument
1447 bfq_end_wr_async_queues(bfqd, bfqd->root_group); in bfq_end_wr_async()
1450 struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio) in bfq_bio_bfqg() argument
1452 return bfqd->root_group; in bfq_bio_bfqg()
1457 return bfqq->bfqd->root_group; in bfqq_group()
1464 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) in bfq_create_group_hierarchy() argument