diff options
author | Paolo Valente <paolo.valente@linaro.org> | 2019-01-29 12:06:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-05 22:33:12 +0200 |
commit | 06666a19d5a5854f0936c02088f0217d2b167d6d (patch) | |
tree | a3109e3cbc23a2baac995d140b85ba0d522efcdd /include/linux | |
parent | 30d503bae9673ff6b0c67c6fa61b95db66319088 (diff) | |
download | linux-stable-06666a19d5a5854f0936c02088f0217d2b167d6d.tar.gz linux-stable-06666a19d5a5854f0936c02088f0217d2b167d6d.tar.bz2 linux-stable-06666a19d5a5854f0936c02088f0217d2b167d6d.zip |
block, bfq: fix in-service-queue check for queue merging
[ Upstream commit 058fdecc6de7cdecbf4c59b851e80eb2d6c5295f ]
When a new I/O request arrives for a bfq_queue, say Q, bfq checks
whether that request is close to
(a) the head request of some other queue waiting to be served, or
(b) the last request dispatched for the in-service queue (in case Q
itself is not the in-service queue)
If a queue, say Q2, is found for which the above condition holds, then
bfq merges Q and Q2, to hopefully get a more sequential I/O in the
resulting merged queue, and thus a possibly higher throughput.
Case (b) is checked by comparing the new request for Q with the last
request dispatched, assuming that the latter necessarily belonged to the
in-service queue. Unfortunately, this assumption is no longer always
correct, since commit d0edc2473be9 ("block, bfq: inject other-queue I/O
into seeky idle queues on NCQ flash").
When the assumption does not hold, queues that must not be merged may be
merged, causing unexpected loss of control on per-queue service
guarantees.
This commit solves this problem by adding an extra field, which stores
the actual last request dispatched for the in-service queue, and by
using this new field to correctly check case (b).
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions