diff options
author | Ming Lei <ming.lei@redhat.com> | 2017-11-04 09:55:34 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-04 08:19:25 -0600 |
commit | 826a70a08b1210bbfdbda812ab43eb986e25b5c2 (patch) | |
tree | 34ffcdb1ac15fef880c93219cc4f5df4fe1785c8 /include | |
parent | e4f36b249b4d4e7599f1cf0c8fb50f196e52677e (diff) | |
download | op-kernel-dev-826a70a08b1210bbfdbda812ab43eb986e25b5c2.zip op-kernel-dev-826a70a08b1210bbfdbda812ab43eb986e25b5c2.tar.gz |
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')
0 files changed, 0 insertions, 0 deletions