diff options
author | Ming Lei | 2017-11-04 02:55:34 +0100 |
---|---|---|
committer | Jens Axboe | 2017-11-04 15:19:25 +0100 |
commit | 826a70a08b1210bbfdbda812ab43eb986e25b5c2 (patch) | |
tree | 34ffcdb1ac15fef880c93219cc4f5df4fe1785c8 /include/linux/blk-mq.h | |
parent | block: fix peeking requests during PM (diff) | |
download | kernel-qcow2-linux-826a70a08b1210bbfdbda812ab43eb986e25b5c2.tar.gz kernel-qcow2-linux-826a70a08b1210bbfdbda812ab43eb986e25b5c2.tar.xz kernel-qcow2-linux-826a70a08b1210bbfdbda812ab43eb986e25b5c2.zip |
SCSI: don't get target/host busy_count in scsi_mq_get_budget()
It is very expensive to atomic_inc/atomic_dec the host wide counter of
host->busy_count, and it should have been avoided via blk-mq's mechanism
of getting driver tag, which uses the more efficient way of sbitmap queue.
Also we don't check atomic_read(&sdev->device_busy) in scsi_mq_get_budget()
and don't run queue if the counter becomes zero, so IO hang may be caused
if all requests are completed just before the current SCSI device
is added to shost->starved_list.
Fixes: 0df21c86bdbf(scsi: implement .get_budget and .put_budget for blk-mq)
Reported-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk-mq.h')
0 files changed, 0 insertions, 0 deletions