https://github.com/torvalds/linux
Revision 1f57f8d442f8017587eeebd8617913bfc3661d3d authored by Jens Axboe on 28 June 2018, 17:54:01 UTC, committed by Jens Axboe on 29 June 2018, 13:52:31 UTC
Some devices have different queue limits depending on the type of IO. A
classic case is SATA NCQ, where some commands can queue, but others
cannot. If we have NCQ commands inflight and encounter a non-queueable
command, the driver returns busy. Currently we attempt to dispatch more
from the scheduler, if we were able to queue some commands. But for the
case where we ended up stopping due to BUSY, we should not attempt to
retrieve more from the scheduler. If we do, we can get into a situation
where we attempt to queue a non-queueable command, get BUSY, then
successfully retrieve more commands from that scheduler and queue those.
This can repeat forever, starving the non-queuable command indefinitely.

Fix this by NOT attempting to pull more commands from the scheduler, if
we get a BUSY return. This should also be more optimal in terms of
letting requests stay in the scheduler for as long as possible, if we
get a BUSY due to the regular out-of-tags condition.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 297ba57
History
Tip revision: 1f57f8d442f8017587eeebd8617913bfc3661d3d authored by Jens Axboe on 28 June 2018, 17:54:01 UTC
blk-mq: don't queue more if we get a busy return
Tip revision: 1f57f8d
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 12.8 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.5 KB
.mailmap -rw-r--r-- 9.3 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.3 KB
Kbuild -rw-r--r-- 2.2 KB
Kconfig -rw-r--r-- 321 bytes
MAINTAINERS -rw-r--r-- 447.9 KB
Makefile -rw-r--r-- 61.1 KB
README -rw-r--r-- 800 bytes

README

back to top