On Sat, 2017-10-14 at 01:29 +0800, Ming Lei wrote: > ->can_queue is size of the whole tag space shared by all LUNs, looks it isn't > reasonable to increase cmd_per_lun to .can_queue. Sorry but I disagree. Setting cmd_per_lun to a value lower than can_queue will result in suboptimal performance if there is only a single LUN per SCSI host. If there are multiple LUNs per SCSI host then the blk-mq core tracks the number of active LUNs through the blk_mq_tags.active_queues variable. See also hctx_may_queue(). The comment above that function is as follows: /* * For shared tag users, we track the number of currently active users * and attempt to provide a fair share of the tag depth for each of them. */ BTW, the ib_srp initiator driver sets cmd_per_lun to can_queue and is able to achieve more than one million IOPS even in tests with multiple LUNs per SCSI host. Bart.