summaryrefslogtreecommitdiffstats
path: root/block/bfq-iosched.h
diff options
context:
space:
mode:
authorPaolo Valente <paolo.valente@linaro.org>2019-01-29 06:06:29 -0500
committerJens Axboe <axboe@kernel.dk>2019-01-31 14:50:23 -0500
commit73d58118498b14e4d2f2391105459b997b586ddc (patch)
tree71e72676425a3eaa6e6ebe582ce27994d1eafbf2 /block/bfq-iosched.h
parent03e565e4204c6cf8687d995de5cafd0341503b4e (diff)
block, bfq: consider also ioprio classes in symmetry detection
In asymmetric scenarios, i.e., when some bfq_queue or bfq_group needs to be guaranteed a different bandwidth than other bfq_queues or bfq_groups, these service guaranteed can be provided only by plugging I/O dispatch, completely or partially, when the queue in service remains temporarily empty. A case where asymmetry is particularly strong is when some active bfq_queues belong to a higher-priority class than some other active bfq_queues. Unfortunately, this important case is not considered at all in the code for detecting asymmetric scenarios. This commit adds the missing logic. Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.h')
-rw-r--r--block/bfq-iosched.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
index 0b02bf302de0..30be669be465 100644
--- a/block/bfq-iosched.h
+++ b/block/bfq-iosched.h
@@ -501,10 +501,11 @@ struct bfq_data {
501 unsigned int num_groups_with_pending_reqs; 501 unsigned int num_groups_with_pending_reqs;
502 502
503 /* 503 /*
504 * Number of bfq_queues containing requests (including the 504 * Per-class (RT, BE, IDLE) number of bfq_queues containing
505 * queue in service, even if it is idling). 505 * requests (including the queue in service, even if it is
506 * idling).
506 */ 507 */
507 int busy_queues; 508 unsigned int busy_queues[3];
508 /* number of weight-raised busy @bfq_queues */ 509 /* number of weight-raised busy @bfq_queues */
509 int wr_busy_queues; 510 int wr_busy_queues;
510 /* number of queued requests */ 511 /* number of queued requests */
@@ -974,6 +975,7 @@ extern struct blkcg_policy blkcg_policy_bfq;
974 975
975struct bfq_group *bfq_bfqq_to_bfqg(struct bfq_queue *bfqq); 976struct bfq_group *bfq_bfqq_to_bfqg(struct bfq_queue *bfqq);
976struct bfq_queue *bfq_entity_to_bfqq(struct bfq_entity *entity); 977struct bfq_queue *bfq_entity_to_bfqq(struct bfq_entity *entity);
978unsigned int bfq_tot_busy_queues(struct bfq_data *bfqd);
977struct bfq_service_tree *bfq_entity_service_tree(struct bfq_entity *entity); 979struct bfq_service_tree *bfq_entity_service_tree(struct bfq_entity *entity);
978struct bfq_entity *bfq_entity_of(struct rb_node *node); 980struct bfq_entity *bfq_entity_of(struct rb_node *node);
979unsigned short bfq_ioprio_to_weight(int ioprio); 981unsigned short bfq_ioprio_to_weight(int ioprio);