Lines Matching defs:bfqd
38 unsigned int bfq_tot_busy_queues(struct bfq_data *bfqd)
40 return bfqd->busy_queues[0] + bfqd->busy_queues[1] +
41 bfqd->busy_queues[2];
153 group_entity = &bfqq->bfqd->root_group->entity;
238 return bfqq->bfqd->root_group;
296 bfq_log_bfqq(bfqq->bfqd, bfqq,
299 bfq_log_bfqq(bfqq->bfqd, bfqq,
480 struct bfq_data *bfqd = NULL;
495 bfqd = (struct bfq_data *)bfqg->bfqd;
498 list_add(&bfqq->bfqq_list, &bfqq->bfqd->active_list);
500 if (bfqg != bfqd->root_group)
534 bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d",
582 struct bfq_data *bfqd = NULL;
594 bfqd = (struct bfq_data *)bfqg->bfqd;
599 if (bfqg != bfqd->root_group)
624 list_add(&bfqq->bfqq_list, &bfqq->bfqd->idle_list);
727 struct bfq_data *bfqd = NULL;
735 bfqd = bfqq->bfqd;
740 bfqd = (struct bfq_data *)bfqg->bfqd;
792 root = &bfqd->queue_weights_tree;
793 __bfq_weights_tree_remove(bfqd, bfqq, root);
802 bfq_weights_tree_add(bfqd, bfqq, root);
844 bfq_log_bfqq(bfqq->bfqd, bfqq, "bfqq_served %d secs", served);
851 * @bfqd: the device
874 void bfq_bfqq_charge_time(struct bfq_data *bfqd, struct bfq_queue *bfqq,
881 (bfqd->bfq_max_budget * bounded_time_ms) / timeout_ms;
1009 struct bfq_data *bfqd = bfqg->bfqd;
1013 bfqd->num_groups_with_pending_reqs++;
1499 bool next_queue_may_preempt(struct bfq_data *bfqd)
1501 struct bfq_sched_data *sd = &bfqd->root_group->sched_data;
1509 struct bfq_queue *bfq_get_next_queue(struct bfq_data *bfqd)
1515 if (bfq_tot_busy_queues(bfqd) == 0)
1523 sd = &bfqd->root_group->sched_data;
1602 bool __bfq_bfqd_reset_in_service(struct bfq_data *bfqd)
1604 struct bfq_queue *in_serv_bfqq = bfqd->in_service_queue;
1609 hrtimer_try_to_cancel(&bfqd->idle_slice_timer);
1610 bfqd->in_service_queue = NULL;
1642 void bfq_deactivate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1650 void bfq_activate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
1659 void bfq_requeue_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1665 bfqq == bfqd->in_service_queue, expiration);
1673 void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1676 bfq_log_bfqq(bfqd, bfqq, "del from busy");
1680 bfqd->busy_queues[bfqq->ioprio_class - 1]--;
1683 bfqd->wr_busy_queues--;
1687 bfq_deactivate_bfqq(bfqd, bfqq, true, expiration);
1690 bfq_weights_tree_remove(bfqd, bfqq);
1696 void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq)
1698 bfq_log_bfqq(bfqd, bfqq, "add to busy");
1700 bfq_activate_bfqq(bfqd, bfqq);
1703 bfqd->busy_queues[bfqq->ioprio_class - 1]++;
1707 bfq_weights_tree_add(bfqd, bfqq,
1708 &bfqd->queue_weights_tree);
1711 bfqd->wr_busy_queues++;