Lines Matching defs:bfqq

32 	struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
34 return bfqq ? bfqq->ioprio_class - 1 :
272 struct bfq_queue *bfqq = NULL;
275 bfqq = container_of(entity, struct bfq_queue, entity);
277 return bfqq;
298 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
303 if (bfqq) {
304 bfq_log_bfqq(bfqq->bfqd, bfqq,
307 bfq_log_bfqq(bfqq->bfqd, bfqq,
352 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
367 if (bfqq)
368 list_del(&bfqq->bfqq_list);
483 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
495 if (bfqq)
496 list_add(&bfqq->bfqq_list, &bfqq->bfqd->active_list[bfqq->actuator_idx]);
526 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
528 if (bfqq) {
529 bfqq->ref++;
530 bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d",
531 bfqq, bfqq->ref);
573 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
581 if (bfqq)
582 list_del(&bfqq->bfqq_list);
595 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
606 if (bfqq)
607 list_add(&bfqq->bfqq_list, &bfqq->bfqd->idle_list);
629 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
633 if (bfqq && !is_in_service)
634 bfq_put_queue(bfqq);
708 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
726 if (bfqq)
727 bfqq->ioprio =
731 if (bfqq && update_class_too)
732 bfqq->ioprio_class = bfqq->new_ioprio_class;
738 if (!bfqq || bfqq->ioprio_class == bfqq->new_ioprio_class)
752 (bfqq ? bfqq->wr_coeff : 1);
758 if (prev_weight != new_weight && bfqq)
759 bfq_weights_tree_remove(bfqq);
765 if (prev_weight != new_weight && bfqq && bfqq->wr_coeff == 1)
766 bfq_weights_tree_add(bfqq);
780 * @bfqq: the queue being served.
784 * are synchronized every time a new bfqq is selected for service. By now,
787 void bfq_bfqq_served(struct bfq_queue *bfqq, int served)
789 struct bfq_entity *entity = &bfqq->entity;
792 if (!bfqq->service_from_backlogged)
793 bfqq->first_IO_time = jiffies;
795 if (bfqq->wr_coeff > 1)
796 bfqq->service_from_wr += served;
798 bfqq->service_from_backlogged += served;
807 bfq_log_bfqq(bfqq->bfqd, bfqq, "bfqq_served %d secs", served);
812 * of the time interval during which bfqq has been in
815 * @bfqq: the queue that needs a service update.
837 void bfq_bfqq_charge_time(struct bfq_data *bfqd, struct bfq_queue *bfqq,
840 struct bfq_entity *entity = &bfqq->entity;
851 bfq_bfqq_served(bfqq,
859 struct bfq_queue *bfqq = bfq_entity_to_bfqq(entity);
896 * As a special case, if bfqq is weight-raised, push up
905 if (bfqq)
906 delta /= bfqq->wr_coeff;
1080 * @requeue: true if this is a requeue, which implies that bfqq is
1458 struct bfq_queue *bfqq;
1530 bfqq = bfq_entity_to_bfqq(entity);
1543 return bfqq;
1576 * bfqq gets freed here.
1587 void bfq_deactivate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1590 struct bfq_entity *entity = &bfqq->entity;
1595 void bfq_activate_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
1597 struct bfq_entity *entity = &bfqq->entity;
1599 bfq_activate_requeue_entity(entity, bfq_bfqq_non_blocking_wait_rq(bfqq),
1601 bfq_clear_bfqq_non_blocking_wait_rq(bfqq);
1604 void bfq_requeue_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
1607 struct bfq_entity *entity = &bfqq->entity;
1610 bfqq == bfqd->in_service_queue, expiration);
1613 void bfq_add_bfqq_in_groups_with_pending_reqs(struct bfq_queue *bfqq)
1616 struct bfq_entity *entity = &bfqq->entity;
1620 if (!(bfqq_group(bfqq)->num_queues_with_pending_reqs++))
1621 bfqq->bfqd->num_groups_with_pending_reqs++;
1626 void bfq_del_bfqq_in_groups_with_pending_reqs(struct bfq_queue *bfqq)
1629 struct bfq_entity *entity = &bfqq->entity;
1633 if (!(--bfqq_group(bfqq)->num_queues_with_pending_reqs))
1634 bfqq->bfqd->num_groups_with_pending_reqs--;
1640 * Called when the bfqq no longer has requests pending, remove it from
1644 void bfq_del_bfqq_busy(struct bfq_queue *bfqq, bool expiration)
1646 struct bfq_data *bfqd = bfqq->bfqd;
1648 bfq_log_bfqq(bfqd, bfqq, "del from busy");
1650 bfq_clear_bfqq_busy(bfqq);
1652 bfqd->busy_queues[bfqq->ioprio_class - 1]--;
1654 if (bfqq->wr_coeff > 1)
1657 bfqg_stats_update_dequeue(bfqq_group(bfqq));
1659 bfq_deactivate_bfqq(bfqd, bfqq, true, expiration);
1661 if (!bfqq->dispatched) {
1662 bfq_del_bfqq_in_groups_with_pending_reqs(bfqq);
1664 * Next function is invoked last, because it causes bfqq to be
1665 * freed. DO NOT use bfqq after the next function invocation.
1667 bfq_weights_tree_remove(bfqq);
1674 void bfq_add_bfqq_busy(struct bfq_queue *bfqq)
1676 struct bfq_data *bfqd = bfqq->bfqd;
1678 bfq_log_bfqq(bfqd, bfqq, "add to busy");
1680 bfq_activate_bfqq(bfqd, bfqq);
1682 bfq_mark_bfqq_busy(bfqq);
1683 bfqd->busy_queues[bfqq->ioprio_class - 1]++;
1685 if (!bfqq->dispatched) {
1686 bfq_add_bfqq_in_groups_with_pending_reqs(bfqq);
1687 if (bfqq->wr_coeff == 1)
1688 bfq_weights_tree_add(bfqq);
1691 if (bfqq->wr_coeff > 1)
1694 /* Move bfqq to the head of the woken list of its waker */
1695 if (!hlist_unhashed(&bfqq->woken_list_node) &&
1696 &bfqq->woken_list_node != bfqq->waker_bfqq->woken_list.first) {
1697 hlist_del_init(&bfqq->woken_list_node);
1698 hlist_add_head(&bfqq->woken_list_node,
1699 &bfqq->waker_bfqq->woken_list);