Lines Matching refs:bfqd
227 if (!(bfqq == bfqg->bfqd->in_service_queue)) in bfqg_stats_update_io_add()
309 bfqq->bfqd->root_group; in bfqq_group()
539 struct bfq_data *bfqd = blkg->q->elevator->elevator_data; in bfq_pd_init() local
551 bfqg->bfqd = bfqd; in bfq_pd_init()
582 static void bfq_link_bfqg(struct bfq_data *bfqd, struct bfq_group *bfqg) in bfq_link_bfqg() argument
596 if (curr_bfqg != bfqd->root_group) { in bfq_link_bfqg()
599 parent = bfqd->root_group; in bfq_link_bfqg()
605 struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio) in bfq_bio_bfqg() argument
623 &bfqg_to_blkg(bfqd->root_group)->blkcg->css); in bfq_bio_bfqg()
624 return bfqd->root_group; in bfq_bio_bfqg()
641 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, in bfq_bfqq_move() argument
659 if (bfqq == &bfqd->oom_bfqq) in bfq_bfqq_move()
678 if (bfqq == bfqd->in_service_queue) in bfq_bfqq_move()
679 bfq_bfqq_expire(bfqd, bfqd->in_service_queue, in bfq_bfqq_move()
683 bfq_deactivate_bfqq(bfqd, bfqq, false, false); in bfq_bfqq_move()
691 else if (bfqd->last_bfqq_created == bfqq) in bfq_bfqq_move()
692 bfqd->last_bfqq_created = NULL; in bfq_bfqq_move()
703 if (unlikely(!bfqd->nonrot_with_queueing)) in bfq_bfqq_move()
704 bfq_pos_tree_add_move(bfqd, bfqq); in bfq_bfqq_move()
705 bfq_activate_bfqq(bfqd, bfqq); in bfq_bfqq_move()
708 if (!bfqd->in_service_queue && !bfqd->tot_rq_in_driver) in bfq_bfqq_move()
709 bfq_schedule_dispatch(bfqd); in bfq_bfqq_move()
714 static void bfq_sync_bfqq_move(struct bfq_data *bfqd, in bfq_sync_bfqq_move() argument
725 bfq_bfqq_move(bfqd, sync_bfqq, bfqg); in bfq_sync_bfqq_move()
750 bfq_release_process_ref(bfqd, sync_bfqq); in bfq_sync_bfqq_move()
764 static void __bfq_bic_change_cgroup(struct bfq_data *bfqd, in __bfq_bic_change_cgroup() argument
770 for (act_idx = 0; act_idx < bfqd->num_actuators; act_idx++) { in __bfq_bic_change_cgroup()
777 bfq_release_process_ref(bfqd, async_bfqq); in __bfq_bic_change_cgroup()
781 bfq_sync_bfqq_move(bfqd, sync_bfqq, bic, bfqg, act_idx); in __bfq_bic_change_cgroup()
787 struct bfq_data *bfqd = bic_to_bfqd(bic); in bfq_bic_update_cgroup() local
788 struct bfq_group *bfqg = bfq_bio_bfqg(bfqd, bio); in bfq_bic_update_cgroup()
797 if (unlikely(!bfqd) || likely(bic->blkcg_serial_nr == serial_nr)) in bfq_bic_update_cgroup()
804 bfq_link_bfqg(bfqd, bfqg); in bfq_bic_update_cgroup()
805 __bfq_bic_change_cgroup(bfqd, bic, bfqg); in bfq_bic_update_cgroup()
879 static void bfq_reparent_leaf_entity(struct bfq_data *bfqd, in bfq_reparent_leaf_entity() argument
899 bfq_bfqq_move(bfqd, bfqq, bfqd->root_group); in bfq_reparent_leaf_entity()
909 static void bfq_reparent_active_queues(struct bfq_data *bfqd, in bfq_reparent_active_queues() argument
918 bfq_reparent_leaf_entity(bfqd, entity, ioprio_class); in bfq_reparent_active_queues()
921 bfq_reparent_leaf_entity(bfqd, in bfq_reparent_active_queues()
938 struct bfq_data *bfqd = bfqg->bfqd; in bfq_pd_offline() local
943 spin_lock_irqsave(&bfqd->lock, flags); in bfq_pd_offline()
967 bfq_reparent_active_queues(bfqd, bfqg, st, i); in bfq_pd_offline()
986 bfq_put_async_queues(bfqd, bfqg); in bfq_pd_offline()
988 spin_unlock_irqrestore(&bfqd->lock, flags); in bfq_pd_offline()
998 void bfq_end_wr_async(struct bfq_data *bfqd) in bfq_end_wr_async() argument
1002 list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) { in bfq_end_wr_async()
1005 bfq_end_wr_async_queues(bfqd, bfqg); in bfq_end_wr_async()
1007 bfq_end_wr_async_queues(bfqd, bfqd->root_group); in bfq_end_wr_async()
1288 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) in bfq_create_group_hierarchy() argument
1292 ret = blkcg_activate_policy(bfqd->queue->disk, &blkcg_policy_bfq); in bfq_create_group_hierarchy()
1296 return blkg_to_bfqg(bfqd->queue->root_blkg); in bfq_create_group_hierarchy()
1453 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq, in bfq_bfqq_move() argument
1471 void bfq_end_wr_async(struct bfq_data *bfqd) in bfq_end_wr_async() argument
1473 bfq_end_wr_async_queues(bfqd, bfqd->root_group); in bfq_end_wr_async()
1476 struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio) in bfq_bio_bfqg() argument
1478 return bfqd->root_group; in bfq_bio_bfqg()
1483 return bfqq->bfqd->root_group; in bfqq_group()
1488 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node) in bfq_create_group_hierarchy() argument