Lines Matching defs:bfqd

227 	if (!(bfqq == ((struct bfq_data *)bfqg->bfqd)->in_service_queue))
314 bfqq->bfqd->root_group;
546 struct bfq_data *bfqd = blkg->q->elevator->elevator_data;
556 bfqg->bfqd = bfqd;
587 static void bfq_link_bfqg(struct bfq_data *bfqd, struct bfq_group *bfqg)
601 if (curr_bfqg != bfqd->root_group) {
604 parent = bfqd->root_group;
610 struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio)
628 &bfqg_to_blkg(bfqd->root_group)->blkcg->css);
629 return bfqd->root_group;
634 * @bfqd: queue descriptor.
646 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
655 if (bfqq == &bfqd->oom_bfqq)
669 if (bfqq == bfqd->in_service_queue)
670 bfq_bfqq_expire(bfqd, bfqd->in_service_queue,
674 bfq_deactivate_bfqq(bfqd, bfqq, false, false);
685 if (unlikely(!bfqd->nonrot_with_queueing))
686 bfq_pos_tree_add_move(bfqd, bfqq);
687 bfq_activate_bfqq(bfqd, bfqq);
690 if (!bfqd->in_service_queue && !bfqd->rq_in_driver)
691 bfq_schedule_dispatch(bfqd);
698 * @bfqd: the queue descriptor.
702 * Move bic to blkcg, assuming that bfqd->lock is held; which makes
706 static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
719 bfq_release_process_ref(bfqd, async_bfqq);
727 bfq_bfqq_move(bfqd, sync_bfqq, bfqg);
754 bfq_release_process_ref(bfqd, sync_bfqq);
764 struct bfq_data *bfqd = bic_to_bfqd(bic);
765 struct bfq_group *bfqg = bfq_bio_bfqg(bfqd, bio);
774 if (unlikely(!bfqd) || likely(bic->blkcg_serial_nr == serial_nr))
781 bfq_link_bfqg(bfqd, bfqg);
782 __bfq_bic_change_cgroup(bfqd, bic, bfqg);
789 * (bfqd->lock). This exposes BFQ to the following sort of
803 * blkg. And these hooks are executed with bfqd->lock held for
808 * are holding bfqd->lock. A blkg_lookup performed with
809 * bfqd->lock held then returns a fully consistent blkg, which
814 * assignment, and (2) bfqd->lock is being held, here we can
818 * release bfqd->lock, even just getting blkg through this
851 * @bfqd: the device data structure with the root group.
855 static void bfq_reparent_leaf_entity(struct bfq_data *bfqd,
875 bfq_bfqq_move(bfqd, bfqq, bfqd->root_group);
880 * @bfqd: the device data structure with the root group.
884 static void bfq_reparent_active_queues(struct bfq_data *bfqd,
893 bfq_reparent_leaf_entity(bfqd, entity, ioprio_class);
896 bfq_reparent_leaf_entity(bfqd,
913 struct bfq_data *bfqd = bfqg->bfqd;
918 spin_lock_irqsave(&bfqd->lock, flags);
942 bfq_reparent_active_queues(bfqd, bfqg, st, i);
961 bfq_put_async_queues(bfqd, bfqg);
964 spin_unlock_irqrestore(&bfqd->lock, flags);
974 void bfq_end_wr_async(struct bfq_data *bfqd)
978 list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) {
981 bfq_end_wr_async_queues(bfqd, bfqg);
983 bfq_end_wr_async_queues(bfqd, bfqd->root_group);
1264 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node)
1268 ret = blkcg_activate_policy(bfqd->queue, &blkcg_policy_bfq);
1272 return blkg_to_bfqg(bfqd->queue->root_blkg);
1429 void bfq_bfqq_move(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1447 void bfq_end_wr_async(struct bfq_data *bfqd)
1449 bfq_end_wr_async_queues(bfqd, bfqd->root_group);
1452 struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio)
1454 return bfqd->root_group;
1459 return bfqq->bfqd->root_group;
1466 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node)