Lines Matching defs:bfqq

32 	struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
34 return bfqq ? bfqq->ioprio_class - 1 :
148 struct bfq_group *bfq_bfqq_to_bfqg(struct bfq_queue *bfqq)
150 struct bfq_entity *group_entity = bfqq->entity.parent;
153 group_entity = &bfqq->bfqd->root_group->entity;
236 struct bfq_group *bfq_bfqq_to_bfqg(struct bfq_queue *bfqq)
238 return bfqq->bfqd->root_group;
264 struct bfq_queue *bfqq = NULL;
267 bfqq = container_of(entity, struct bfq_queue, entity);
269 return bfqq;
290 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
295 if (bfqq) {
296 bfq_log_bfqq(bfqq->bfqd, bfqq,
299 bfq_log_bfqq(bfqq->bfqd, bfqq,
344 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
359 if (bfqq)
360 list_del(&bfqq->bfqq_list);
475 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
497 if (bfqq)
498 list_add(&bfqq->bfqq_list, &bfqq->bfqd->active_list);
530 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
532 if (bfqq) {
533 bfqq->ref++;
534 bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d",
535 bfqq, bfqq->ref);
577 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
596 if (bfqq)
597 list_del(&bfqq->bfqq_list);
612 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
623 if (bfqq)
624 list_add(&bfqq->bfqq_list, &bfqq->bfqd->idle_list);
646 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
650 if (bfqq && !is_in_service)
651 bfq_put_queue(bfqq);
725 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
734 if (bfqq)
735 bfqd = bfqq->bfqd;
759 if (bfqq)
760 bfqq->ioprio =
764 if (bfqq && update_class_too)
765 bfqq->ioprio_class = bfqq->new_ioprio_class;
771 if (!bfqq || bfqq->ioprio_class == bfqq->new_ioprio_class)
785 (bfqq ? bfqq->wr_coeff : 1);
791 if (prev_weight != new_weight && bfqq) {
793 __bfq_weights_tree_remove(bfqd, bfqq, root);
800 if (prev_weight != new_weight && bfqq && bfqq->wr_coeff == 1) {
802 bfq_weights_tree_add(bfqd, bfqq, root);
817 * @bfqq: the queue being served.
821 * are synchronized every time a new bfqq is selected for service. By now,
824 void bfq_bfqq_served(struct bfq_queue *bfqq, int served)
826 struct bfq_entity *entity = &bfqq->entity;
829 if (!bfqq->service_from_backlogged)
830 bfqq->first_IO_time = jiffies;
832 if (bfqq->wr_coeff > 1)
833 bfqq->service_from_wr += served;
835 bfqq->service_from_backlogged += served;
844 bfq_log_bfqq(bfqq->bfqd, bfqq, "bfqq_served %d secs", served);
849 * of the time interval during which bfqq has been in
852 * @bfqq: the queue that needs a service update.
874 void bfq_bfqq_charge_time(struct bfq_data *bfqd, struct bfq_queue *bfqq,
877 struct bfq_entity *entity = &bfqq->entity;
888 bfq_bfqq_served(bfqq,
896 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
933 * As a special case, if bfqq is weight-raised, push up
942 if (bfqq)
943 delta /= bfqq->wr_coeff;
1130 * @requeue: true if this is a requeue, which implies that bfqq is
1513 struct bfq_queue *bfqq;
1585 bfqq = bfq_entity_to_bfqq(entity);
1598 return bfqq;
1631 * bfqq gets freed here.
1642 void bfq_deactivate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1645 struct bfq_entity *entity = &bfqq->entity;
1650 void bfq_activate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
1652 struct bfq_entity *entity = &bfqq->entity;
1654 bfq_activate_requeue_entity(entity, bfq_bfqq_non_blocking_wait_rq(bfqq),
1656 bfq_clear_bfqq_non_blocking_wait_rq(bfqq);
1659 void bfq_requeue_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1662 struct bfq_entity *entity = &bfqq->entity;
1665 bfqq == bfqd->in_service_queue, expiration);
1669 * Called when the bfqq no longer has requests pending, remove it from
1673 void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1676 bfq_log_bfqq(bfqd, bfqq, "del from busy");
1678 bfq_clear_bfqq_busy(bfqq);
1680 bfqd->busy_queues[bfqq->ioprio_class - 1]--;
1682 if (bfqq->wr_coeff > 1)
1685 bfqg_stats_update_dequeue(bfqq_group(bfqq));
1687 bfq_deactivate_bfqq(bfqd, bfqq, true, expiration);
1689 if (!bfqq->dispatched)
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);
1702 bfq_mark_bfqq_busy(bfqq);
1703 bfqd->busy_queues[bfqq->ioprio_class - 1]++;
1705 if (!bfqq->dispatched)
1706 if (bfqq->wr_coeff == 1)
1707 bfq_weights_tree_add(bfqd, bfqq,
1710 if (bfqq->wr_coeff > 1)