Revert "BACKPORT: FROMLIST: scsi: core: Reserve one tag for the UFS driver"
Revert commitff748ee298
since it is no longer needed now that commita8f9df1ffc
("FROMGIT: scsi: ufs: Fix a deadlock in the error handler") has been applied. This patch increases the UFS queue depth from 30 to 31. For the original patch, see also https://android-review.googlesource.com/q/I6273114ae8cc6c2a74c72f7bc090eb0319ec5772 Bug: 220258338 Test: $ adb shell cat /sys/devices/platform/*/host0/scsi_host/host0/can_queue Test: 31 Test: $ fio --bs=4096 --group_reporting=1 --gtod_reduce=1 --invalidate=1 --ioengine=io_uring --ioscheduler=none --norandommap --runtime=30 --rw=randread --thread --time_based=1 --numjobs=1 --iodepth=64 --iodepth_batch_submit=32 --iodepth_batch_complete=32 --name=/dev/block/sda --filename=/dev/block/sda Test: IOPS=28.6K (with a debug kernel) Change-Id: Ie6afb17fde2f688967e84c50161b4526bb7845e7 Signed-off-by: Bart Van Assche <bvanassche@google.com> (cherry picked from commit30180ef431
)
This commit is contained in:
parent
803ff1161c
commit
306d827cfb
@ -220,6 +220,10 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Use min_t(int, ...) in case shost->can_queue exceeds SHRT_MAX */
|
||||
shost->cmd_per_lun = min_t(int, shost->cmd_per_lun,
|
||||
shost->can_queue);
|
||||
|
||||
error = scsi_init_sense_cache(shost);
|
||||
if (error)
|
||||
goto fail;
|
||||
@ -228,12 +232,6 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
|
||||
if (error)
|
||||
goto fail;
|
||||
|
||||
shost->can_queue = shost->tag_set.queue_depth;
|
||||
|
||||
/* Use min_t(int, ...) in case shost->can_queue exceeds SHRT_MAX */
|
||||
shost->cmd_per_lun = min_t(int, shost->cmd_per_lun,
|
||||
shost->can_queue);
|
||||
|
||||
if (!shost->shost_gendev.parent)
|
||||
shost->shost_gendev.parent = dev ? dev : &platform_bus;
|
||||
if (!dma_dev)
|
||||
|
@ -1907,10 +1907,6 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost)
|
||||
tag_set->ops = &scsi_mq_ops_no_commit;
|
||||
tag_set->nr_hw_queues = shost->nr_hw_queues ? : 1;
|
||||
tag_set->queue_depth = shost->can_queue;
|
||||
if (shost->hostt->name && strcmp(shost->hostt->name, "ufshcd") == 0) {
|
||||
tag_set->queue_depth--;
|
||||
tag_set->reserved_tags++;
|
||||
}
|
||||
tag_set->cmd_size = cmd_size;
|
||||
tag_set->numa_node = NUMA_NO_NODE;
|
||||
tag_set->flags = BLK_MQ_F_SHOULD_MERGE;
|
||||
|
Loading…
Reference in New Issue
Block a user