linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v13 00/15] Add Multi Circular Queue Support
@ 2023-01-13 20:48 Asutosh Das
  2023-01-13 20:48 ` [PATCH v13 01/15] ufs: core: Probe for ext_iid support Asutosh Das
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Asutosh Das @ 2023-01-13 20:48 UTC (permalink / raw)
  To: quic_cang, martin.petersen, linux-scsi
  Cc: quic_nguyenb, quic_xiaosenh, stanley.chu, adrian.hunter,
	bvanassche, avri.altman, mani, beanhuo, Asutosh Das,
	linux-arm-msm

Hi Martin,

This patch series is an implementation of UFS Multi-Circular Queue.
Please consider this series for next merge window.
This implementation has been verified on a Qualcomm & MediaTek platform.

Thanks,
Asutosh


UFS Multi-Circular Queue (MCQ) has been added in UFSHCI v4.0 to improve storage performance.
The implementation uses the shared tagging mechanism so that tags are shared
among the hardware queues. The number of hardware queues is configurable.
This series doesn't include the ESI implementation for completion handling.

Please take a look and let us know your thoughts.

v12 -> v13:
- Rebased on top of latest Martin's tree and fixed conflicts 
- Fixed merged conflicts due to (3d2f12b Merge patch series "ufs: qcom: Add HS-G4 support") in
  0003-ufs-core-Defer-adding-host-to-scsi-if-mcq-is-support.patch to support the reinitialization
  needed on Qualcomm platforms for HS-G4.
 
v11 -> v12:
- Dropped 0001-ufs-core-Optimize-duplicate-code-to-read-extended-fe.patch.
  Arthur's change series
  (https://lore.kernel.org/r/1670763911-8695-1-git-send-email-Arthur.Simchaev@wdc.com) makes this change unnecessary.
- Pass hwq as a parameter to ufshcd_send_command() in ufshcd_advanced_rpmb_req_handler()
- Added Stanley Chu's Reviewed-by tags

v10 -> v11:
- Added Stanley Chu's Reviewed-by tags

v9 -> v10:
- Fix few checkpatch warnings
- Use div_u64() instead of direct division in ufshcd_mcq_get_tag() to fix a LKP
warning

v8 -> v9:
- Added missing Reviewed-by tags.

v7 -> v8:
- Addressed Eddie's comments

v6 -> v7:
- Added missing Reviewed-by tags.

v5 -> v6:
- Addressed Mani's comments
- Addressed Bart's comments

v4 -> v5:
- Fixed failure to fallback to SDB during initialization
- Fixed failure when rpm-lvl=5 in the ufshcd_host_reset_and_restore() path
- Improved ufshcd_mcq_config_nr_queues() to handle different configurations
- Addressed Bart's comments
- Verified read/write using FIO, clock gating, runtime-pm[lvl=3, lvl=5]

v3 -> v4:
- Added a kernel module parameter to disable MCQ mode
- Added Bart's reviewed-by tag for some patches
- Addressed Bart's comments

v2 -> v3:
- Split ufshcd_config_mcq() into ufshcd_alloc_mcq() and ufshcd_config_mcq()
- Use devm_kzalloc() in ufshcd_mcq_init()
- Free memory and resource allocation on error paths
- Corrected typos in code comments

v1 -> v2:
- Added a non MCQ related change to use a function to extrace ufs extended
feature
- Addressed Mani's comments
- Addressed Bart's comments

v1:
- Split the changes
- Addressed Bart's comments
- Addressed Bean's comments

* RFC versions:
v2 -> v3:
- Split the changes based on functionality
- Addressed queue configuration issues
- Faster SQE tail pointer increments
- Addressed comments from Bart and Manivannan

v1 -> v2:
- Enabled host_tagset
- Added queue num configuration support
- Added one more vops to allow vendor provide the wanted MAC
- Determine nutrs and can_queue by considering both MAC, bqueuedepth and EXT_IID support
- Postponed MCQ initialization and scsi_add_host() to async probe
- Used (EXT_IID, Task Tag) tuple to support up to 4096 tasks (theoretically)


Asutosh Das (15):
  ufs: core: Probe for ext_iid support
  ufs: core: Introduce Multi-circular queue capability
  ufs: core: Defer adding host to scsi if mcq is supported
  ufs: core: mcq: Add support to allocate multiple queues
  ufs: core: mcq: Configure resource regions
  ufs: core: mcq: Calculate queue depth
  ufs: core: mcq: Allocate memory for mcq mode
  ufs: core: mcq: Configure operation and runtime interface
  ufs: core: mcq: Use shared tags for MCQ mode
  ufs: core: Prepare ufshcd_send_command for mcq
  ufs: core: mcq: Find hardware queue to queue request
  ufs: core: Prepare for completion in mcq
  ufs: mcq: Add completion support of a cqe
  ufs: core: mcq: Add completion support in poll
  ufs: core: mcq: Enable Multi Circular Queue

 drivers/ufs/core/Makefile      |   2 +-
 drivers/ufs/core/ufs-mcq.c     | 415 +++++++++++++++++++++++++++++++++++++++++
 drivers/ufs/core/ufshcd-priv.h |  92 ++++++++-
 drivers/ufs/core/ufshcd.c      | 377 +++++++++++++++++++++++++++++++------
 drivers/ufs/host/ufs-qcom.c    | 146 +++++++++++++++
 drivers/ufs/host/ufs-qcom.h    |   5 +
 include/ufs/ufs.h              |   7 +
 include/ufs/ufshcd.h           | 129 +++++++++++++
 include/ufs/ufshci.h           |  64 +++++++
 9 files changed, 1177 insertions(+), 60 deletions(-)
 create mode 100644 drivers/ufs/core/ufs-mcq.c

-- 
2.7.4


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-01-19  0:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 20:48 [PATCH v13 00/15] Add Multi Circular Queue Support Asutosh Das
2023-01-13 20:48 ` [PATCH v13 01/15] ufs: core: Probe for ext_iid support Asutosh Das
2023-01-13 20:48 ` [PATCH v13 02/15] ufs: core: Introduce Multi-circular queue capability Asutosh Das
2023-01-13 20:48 ` [PATCH v13 03/15] ufs: core: Defer adding host to scsi if mcq is supported Asutosh Das
2023-01-13 20:48 ` [PATCH v13 04/15] ufs: core: mcq: Add support to allocate multiple queues Asutosh Das
2023-01-13 20:48 ` [PATCH v13 05/15] ufs: core: mcq: Configure resource regions Asutosh Das
2023-01-13 20:48 ` [PATCH v13 06/15] ufs: core: mcq: Calculate queue depth Asutosh Das
2023-01-13 20:48 ` [PATCH v13 07/15] ufs: core: mcq: Allocate memory for mcq mode Asutosh Das
2023-01-13 20:48 ` [PATCH v13 08/15] ufs: core: mcq: Configure operation and runtime interface Asutosh Das
2023-01-13 20:48 ` [PATCH v13 09/15] ufs: core: mcq: Use shared tags for MCQ mode Asutosh Das
2023-01-13 20:48 ` [PATCH v13 10/15] ufs: core: Prepare ufshcd_send_command for mcq Asutosh Das
2023-01-13 20:48 ` [PATCH v13 11/15] ufs: core: mcq: Find hardware queue to queue request Asutosh Das
2023-01-13 20:48 ` [PATCH v13 12/15] ufs: core: Prepare for completion in mcq Asutosh Das
2023-01-13 20:48 ` [PATCH v13 13/15] ufs: mcq: Add completion support of a cqe Asutosh Das
2023-01-13 20:48 ` [PATCH v13 14/15] ufs: core: mcq: Add completion support in poll Asutosh Das
2023-01-13 20:48 ` [PATCH v13 15/15] ufs: core: mcq: Enable Multi Circular Queue Asutosh Das
2023-01-14  2:16 ` [PATCH v13 00/15] Add Multi Circular Queue Support Martin K. Petersen
2023-01-19  0:44 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).