Skip to content

Commit

Permalink
block, bfq: keep shared queues out of the waker mechanism
Browse files Browse the repository at this point in the history
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. This commit
keeps shared queues out of the waker-detection mechanism.

Tested-by: Jan Kara <[email protected]>
Signed-off-by: Paolo Valente <[email protected]>
Tested-by: Oleksandr Natalenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Algodev-github authored and axboe committed Mar 25, 2021
1 parent 8c54477 commit 85686d0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion block/bfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 85686d0

Please sign in to comment.