author: Paolo Valente <paolo.valente@linaro.org> 2021-03-04 18:46:26 +0100
committer: Jens Axboe <axboe@kernel.dk> 2021-03-25 10:50:07 -0600
commit: 85686d0dc1946bd9903efb1c130d634f963e4843
parent: 8c544770092a3d7532d01903b75721e537d87001
Commit Summary:
Diffstat:
1 file changed, 11 insertions, 1 deletion
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 2a84294b0525..a3f59d3065b3 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5860,7 +5860,17 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd)
1UL<<(BFQ_RATE_SHIFT - 10))
bfq_update_rate_reset(bfqd, NULL);
bfqd->last_completion = now_ns;
- bfqd->last_completed_rq_bfqq = bfqq;
+ /*
+ * Shared queues are likely to receive I/O at a high
+ * rate. This may deceptively let them be considered as wakers
+ * of other queues. But a false waker will unjustly steal
+ * bandwidth to its supposedly woken queue. So considering
+ * also shared queues in the waking mechanism may cause more
+ * control troubles than throughput benefits. Then do not set
+ * last_completed_rq_bfqq to bfqq if bfqq is a shared queue.
+ */
+ if (!bfq_bfqq_coop(bfqq))
+ bfqd->last_completed_rq_bfqq = bfqq;
/*
* If we are waiting to discover whether the request pattern