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
556 bfqg->bfqd = bfqd; in bfq_pd_init()
586 static struct bfq_group *bfq_lookup_bfqg(struct bfq_data *bfqd, in bfq_lookup_bfqg() argument
591 blkg = blkg_lookup(blkcg, bfqd->queue); in bfq_lookup_bfqg()
597 struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd, in bfq_find_set_group() argument
603 bfqg = bfq_lookup_bfqg(bfqd, blkcg); in bfq_find_set_group()
617 if (curr_bfqg != bfqd->root_group) { in bfq_find_set_group()
620 parent = bfqd->root_group; in bfq_find_set_group()
642 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, in bfq_bfqq_move() argument
659 if (bfqq == bfqd->in_service_queue) in bfq_bfqq_move()
660 bfq_bfqq_expire(bfqd, bfqd->in_service_queue, in bfq_bfqq_move()
664 bfq_deactivate_bfqq(bfqd, bfqq, false, false); in bfq_bfqq_move()
672 else if (bfqd->last_bfqq_created == bfqq) in bfq_bfqq_move()
673 bfqd->last_bfqq_created = NULL; in bfq_bfqq_move()
681 if (unlikely(!bfqd->nonrot_with_queueing)) in bfq_bfqq_move()
682 bfq_pos_tree_add_move(bfqd, bfqq); in bfq_bfqq_move()
683 bfq_activate_bfqq(bfqd, bfqq); in bfq_bfqq_move()
686 if (!bfqd->in_service_queue && !bfqd->rq_in_driver) in bfq_bfqq_move()
687 bfq_schedule_dispatch(bfqd); in bfq_bfqq_move()
706 static struct bfq_group *__bfq_bic_change_cgroup(struct bfq_data *bfqd, in __bfq_bic_change_cgroup() argument
715 bfqg = bfq_find_set_group(bfqd, blkcg); in __bfq_bic_change_cgroup()
718 bfqg = bfqd->root_group; in __bfq_bic_change_cgroup()
725 bfq_release_process_ref(bfqd, async_bfqq); in __bfq_bic_change_cgroup()
732 bfq_bfqq_move(bfqd, sync_bfqq, bfqg); in __bfq_bic_change_cgroup()
740 struct bfq_data *bfqd = bic_to_bfqd(bic); in bfq_bic_update_cgroup() local
751 if (unlikely(!bfqd) || likely(bic->blkcg_serial_nr == serial_nr)) in bfq_bic_update_cgroup()
754 bfqg = __bfq_bic_change_cgroup(bfqd, bic, __bio_blkcg(bio)); in bfq_bic_update_cgroup()
829 static void bfq_reparent_leaf_entity(struct bfq_data *bfqd, in bfq_reparent_leaf_entity() argument
849 bfq_bfqq_move(bfqd, bfqq, bfqd->root_group); in bfq_reparent_leaf_entity()
858 static void bfq_reparent_active_queues(struct bfq_data *bfqd, in bfq_reparent_active_queues() argument
867 bfq_reparent_leaf_entity(bfqd, entity, ioprio_class); in bfq_reparent_active_queues()
870 bfq_reparent_leaf_entity(bfqd, in bfq_reparent_active_queues()
887 struct bfq_data *bfqd = bfqg->bfqd; in bfq_pd_offline() local
892 spin_lock_irqsave(&bfqd->lock, flags); in bfq_pd_offline()
916 bfq_reparent_active_queues(bfqd, bfqg, st, i); in bfq_pd_offline()
935 bfq_put_async_queues(bfqd, bfqg); in bfq_pd_offline()
937 spin_unlock_irqrestore(&bfqd->lock, flags); in bfq_pd_offline()
947 void bfq_end_wr_async(struct bfq_data *bfqd) in bfq_end_wr_async() argument
951 list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) { in bfq_end_wr_async()
954 bfq_end_wr_async_queues(bfqd, bfqg); in bfq_end_wr_async()
956 bfq_end_wr_async_queues(bfqd, bfqd->root_group); in bfq_end_wr_async()
1237 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) in bfq_create_group_hierarchy() argument
1241 ret = blkcg_activate_policy(bfqd->queue, &blkcg_policy_bfq); in bfq_create_group_hierarchy()
1245 return blkg_to_bfqg(bfqd->queue->root_blkg); in bfq_create_group_hierarchy()
1402 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, in bfq_bfqq_move() argument
1420 void bfq_end_wr_async(struct bfq_data *bfqd) in bfq_end_wr_async() argument
1422 bfq_end_wr_async_queues(bfqd, bfqd->root_group); in bfq_end_wr_async()
1425 struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd, struct blkcg *blkcg) in bfq_find_set_group() argument
1427 return bfqd->root_group; in bfq_find_set_group()
1432 return bfqq->bfqd->root_group; in bfqq_group()
1439 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) in bfq_create_group_hierarchy() argument