linux/drivers/scsi/ufs
Bart Van Assche d0b2b70eb1 scsi: ufs: core: Increase the usable queue depth
With the current implementation of the UFS driver active_queues is 1
instead of 0 if all UFS request queues are idle. That causes
hctx_may_queue() to divide the queue depth by 2 when queueing a request and
hence reduces the usable queue depth.

The shared tag set code in the block layer keeps track of the number of
active request queues. blk_mq_tag_busy() is called before a request is
queued onto a hwq and blk_mq_tag_idle() is called some time after the hwq
became idle. blk_mq_tag_idle() is called from inside blk_mq_timeout_work().
Hence, blk_mq_tag_idle() is only called if a timer is associated with each
request that is submitted to a request queue that shares a tag set with
another request queue.

Adds a blk_mq_start_request() call in ufshcd_exec_dev_cmd(). This doubles
the queue depth on my test setup from 16 to 32.

In addition to increasing the usable queue depth, also fix the
documentation of the 'timeout' parameter in the header above
ufshcd_exec_dev_cmd().

Link: https://lore.kernel.org/r/20210513164912.5683-1-bvanassche@acm.org
Fixes: 7252a36030 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts")
Cc: Can Guo <cang@codeaurora.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-14 22:24:54 -04:00
..
cdns-pltfrm.c scsi: ufs: cdns-pltfrm: Supply function names for headers 2021-03-15 22:28:58 -04:00
Kconfig Merge branch '5.11/scsi-fixes' into 5.12/scsi-queue 2021-01-26 21:52:58 -05:00
Makefile scsi: ufs: ufs-debugfs: Add error counters 2021-01-12 22:14:06 -05:00
tc-dwc-g210-pci.c
tc-dwc-g210-pltfrm.c
tc-dwc-g210.c
tc-dwc-g210.h
ti-j721e-ufs.c scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe() 2020-08-17 21:48:45 -04:00
ufs_bsg.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ufs_bsg.h
ufs_quirks.h scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM" 2020-07-30 21:10:29 -04:00
ufs-debugfs.c scsi: ufs: ufs-debugfs: Add user-defined exception event rate limiting 2021-03-04 17:36:59 -05:00
ufs-debugfs.h scsi: ufs: ufs-debugfs: Add user-defined exception event rate limiting 2021-03-04 17:36:59 -05:00
ufs-exynos.c scsi: ufs: ufs-exynos: Remove pwr_max from parameter list of exynos_ufs_post_pwr_mode() 2021-03-24 22:25:47 -04:00
ufs-exynos.h scsi: ufs: ufs-exynos: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-hisi.c scsi: ufs: ufs-hisi: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-hisi.h scsi: ufs: ufs-hisi: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-mediatek-trace.h scsi: ufs-mediatek: Use correct path to fix compile error 2020-12-09 12:00:26 -05:00
ufs-mediatek.c scsi: ufs: ufs-mediatek: Fix power down spec violation 2021-05-14 22:04:26 -04:00
ufs-mediatek.h scsi: ufs-mediatek: Keep VCC always-on for specific devices 2020-12-09 11:34:20 -05:00
ufs-qcom-ice.c scsi: ufs-qcom: Add Inline Crypto Engine support 2020-07-24 22:09:54 -04:00
ufs-qcom.c scsi: ufs: ufs-qcom: Remove redundant dev_err() call in ufs_qcom_init() 2021-04-12 23:25:30 -04:00
ufs-qcom.h scsi: ufs: ufs-qcom: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-sysfs.c scsi: ufs: core: Fix a typo in ufs-sysfs.c 2021-04-28 22:55:00 -04:00
ufs-sysfs.h
ufs.h scsi: ufs: Add exception event definitions 2021-03-04 17:36:58 -05:00
ufshcd-crypto.c SCSI misc on 20210219 2021-02-22 10:24:58 -08:00
ufshcd-crypto.h scsi: ufs: use devm_blk_ksm_init() 2021-02-01 12:01:56 +01:00
ufshcd-dwc.c scsi: ufs-dwc: Use phy_initialization helper 2020-12-07 18:00:06 -05:00
ufshcd-dwc.h
ufshcd-pci.c scsi: ufs: ufs-pci: Add support for Intel LKF 2021-03-17 00:04:40 -04:00
ufshcd-pltfrm.c scsi: ufs: ufshcd-pltfrm: Fix deferred probing 2021-04-13 00:14:34 -04:00
ufshcd-pltfrm.h scsi: ufs: Introduce device parameter initialization function 2020-11-17 01:03:18 -05:00
ufshcd.c scsi: ufs: core: Increase the usable queue depth 2021-05-14 22:24:54 -04:00
ufshcd.h scsi: ufs: core: Correct status type in ufshcd_vops_pwr_change_notify() 2021-03-24 22:25:40 -04:00
ufshci-dwc.h
ufshci.h scsi: ufs: core: Fix out-of-bounds warnings in ufshcd_exec_raw_upiu_cmd() 2021-04-05 23:38:45 -04:00
unipro.h scsi: ufs: Add enums for UniPro version higher than 1.6 2020-11-10 23:03:18 -05:00