Lines Matching defs:queued
54 * To avoid such starvation, dispatched bios are queued separately
59 * throtl_qnode is used to keep the queued bios separated by their sources.
60 * Bios are queued to throtl_qnode which in turn is queued to
64 * belongs to a throtl_grp and gets queued on itself or the parent, so
66 * queued and decrementing when dequeued is enough to keep the whole blkg
70 struct list_head node; /* service_queue->queued[] */
71 struct bio_list bios; /* queued bios */
79 * Bios queued directly to this service_queue or dispatched from
82 struct list_head queued[2]; /* throtl_qnode [READ/WRITE] */
83 unsigned int nr_queued[2]; /* number of queued bios */
90 unsigned int nr_pending; /* # queued in the tree */
122 * qnode_on_self is used when bios are directly queued to this
209 /* Total Number of queued bios on READ and WRITE lists */
408 * @queued: the service_queue->queued[] list @qn belongs to
410 * Add @bio to @qn and put @qn on @queued if it's not already on.
415 struct list_head *queued)
419 list_add_tail(&qn->node, queued);
426 * @queued: the qnode list to peek
428 static struct bio *throtl_peek_queued(struct list_head *queued)
433 if (list_empty(queued))
436 qn = list_first_entry(queued, struct throtl_qnode, node);
444 * @queued: the qnode list to pop a bio from
447 * Pop the first bio from the qnode list @queued. After popping, the first
448 * qnode is removed from @queued if empty or moved to the end of @queued so
456 static struct bio *throtl_pop_queued(struct list_head *queued,
462 if (list_empty(queued))
465 qn = list_first_entry(queued, struct throtl_qnode, node);
476 list_move_tail(&qn->node, queued);
485 INIT_LIST_HEAD(&sq->queued[0]);
486 INIT_LIST_HEAD(&sq->queued[1]);
1005 * queued in the group bio list. So one should not be calling
1007 * queued.
1010 bio != throtl_peek_queued(&tg->service_queue.queued[rw]));
1023 * If there is queued bio, that means there should be an active
1096 * If @tg doesn't currently have any bios queued in the same
1104 throtl_qnode_add_bio(bio, qn, &sq->queued[rw]);
1116 bio = throtl_peek_queued(&sq->queued[READ]);
1120 bio = throtl_peek_queued(&sq->queued[WRITE]);
1160 bio = throtl_pop_queued(&sq->queued[rw], &tg_to_put);
1169 * bio_lists[] and decrease total number queued. The caller is
1177 &parent_sq->queued[rw]);
1198 while ((bio = throtl_peek_queued(&sq->queued[READ])) &&
1208 while ((bio = throtl_peek_queued(&sq->queued[WRITE])) &&
1261 * pending and queued on the service_queue's pending_tree and expires when
1335 * This function is queued for execution when bios reach the bio_lists[]
1354 while ((bio = throtl_pop_queued(&td_sq->queued[rw], NULL)))
2280 /* throtl is FIFO - if bios are already queued, should queue */
2298 * We need to trim slice even when bios are not being queued
2299 * otherwise it might happen that a bio is not queued for
2303 * low rate and * newly queued IO gets a really long dispatch
2306 * So keep on trimming slice even if bio is not queued.
2323 throtl_log(sq, "[%c] bio. bdisp=%llu sz=%u bps=%llu iodisp=%u iops=%u queued=%d/%d",