]> Git Repo - linux.git/commit - drivers/scsi/scsi.c
scsi: core: avoid host-wide host_busy counter for scsi_mq
authorMing Lei <[email protected]>
Fri, 25 Oct 2019 06:58:55 +0000 (14:58 +0800)
committerMartin K. Petersen <[email protected]>
Sat, 2 Nov 2019 00:12:50 +0000 (20:12 -0400)
commit6eb045e092efefafc6687409a6fa6d1dabf0fb69
treeaeb333b78b8514f84daa88f6e431ea69ab51b22c
parent7f674c38a38e056bb33d1d67700410c3f3124d34
scsi: core: avoid host-wide host_busy counter for scsi_mq

It isn't necessary to check the host depth in scsi_queue_rq() any more
since it has been respected by blk-mq before calling scsi_queue_rq() via
getting driver tag.

Lots of LUNs may attach to same host and per-host IOPS may reach millions,
so we should avoid expensive atomic operations on the host-wide counter in
the IO path.

This patch implements scsi_host_busy() via blk_mq_tagset_busy_iter() with
one scsi command state for reading the count of busy IOs for scsi_mq.

It is observed that IOPS is increased by 15% in IO test on scsi_debug (32
LUNs, 32 submit queues, 1024 can_queue, libaio/dio) in a dual-socket
system.

Cc: Jens Axboe <[email protected]>
Cc: Ewan D. Milne <[email protected]>
Cc: Omar Sandoval <[email protected]>,
Cc: "Martin K. Petersen" <[email protected]>,
Cc: James Bottomley <[email protected]>,
Cc: Christoph Hellwig <[email protected]>,
Cc: Kashyap Desai <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Laurence Oberman <[email protected]>
Cc: Bart Van Assche <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ming Lei <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/hosts.c
drivers/scsi/scsi.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_priv.h
include/scsi/scsi_cmnd.h
include/scsi/scsi_host.h
This page took 0.058066 seconds and 4 git commands to generate.