mbox series

[v4,0/5] ufs: Do not requeue while ungating the clock

Message ID 20230529202640.11883-1-bvanassche@acm.org (mailing list archive)
Headers show
Series ufs: Do not requeue while ungating the clock | expand

Message

Bart Van Assche May 29, 2023, 8:26 p.m. UTC
Hi Martin,

In the traces we recorded while testing zoned storage we noticed that UFS
commands are requeued while the clock is being ungated. Command requeueing
makes it harder than necessary to preserve the command order. Hence this
patch series that modifies the SCSI core and also the UFS driver such that
clock ungating does not trigger command requeueing.

Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v3:
- Added a patch that removes two duplicate declarations.

Changes compared to v2:
- Only enable BLK_MQ_F_BLOCKING if clock gating is supported.
- Introduce flag queuecommand_may_block in both the SCSI host and SCSI host
  template data structures.

Changes compared to v1:
- Dropped patch "scsi: ufs: core: Unexport ufshcd_hold() and ufshcd_release()".
- Removed a ufshcd_scsi_block_requests() / ufshcd_scsi_unblock_requests() pair
  from patch "scsi: ufs: Ungate the clock synchronously".

Bart Van Assche (4):
  scsi: core: Rework scsi_host_block()
  scsi: core: Support setting BLK_MQ_F_BLOCKING
  scsi: ufs: Conditionally enable the BLK_MQ_F_BLOCKING flag
  scsi: ufs: Ungate the clock synchronously

Bart Van Assche (5):
  scsi: core: Rework scsi_host_block()
  scsi: core: Support setting BLK_MQ_F_BLOCKING
  scsi: ufs: Conditionally enable the BLK_MQ_F_BLOCKING flag
  scsi: ufs: Declare ufshcd_{hold,release}() once
  scsi: ufs: Ungate the clock synchronously

 drivers/scsi/hosts.c             |  1 +
 drivers/scsi/scsi_lib.c          | 27 ++++++----
 drivers/ufs/core/ufs-sysfs.c     |  2 +-
 drivers/ufs/core/ufshcd-crypto.c |  2 +-
 drivers/ufs/core/ufshcd-priv.h   |  3 --
 drivers/ufs/core/ufshcd.c        | 87 ++++++++++----------------------
 include/scsi/scsi_host.h         |  6 +++
 include/ufs/ufshcd.h             |  2 +-
 8 files changed, 54 insertions(+), 76 deletions(-)

Comments

Martin K. Petersen May 31, 2023, 3:45 p.m. UTC | #1
Bart,

> In the traces we recorded while testing zoned storage we noticed that
> UFS commands are requeued while the clock is being ungated. Command
> requeueing makes it harder than necessary to preserve the command
> order. Hence this patch series that modifies the SCSI core and also
> the UFS driver such that clock ungating does not trigger command
> requeueing.

Applied to 6.5/scsi-staging, thanks!
Martin K. Petersen June 8, 2023, 1:42 a.m. UTC | #2
On Mon, 29 May 2023 13:26:35 -0700, Bart Van Assche wrote:

> In the traces we recorded while testing zoned storage we noticed that UFS
> commands are requeued while the clock is being ungated. Command requeueing
> makes it harder than necessary to preserve the command order. Hence this
> patch series that modifies the SCSI core and also the UFS driver such that
> clock ungating does not trigger command requeueing.
> 
> Please consider this patch series for the next merge window.
> 
> [...]

Applied to 6.5/scsi-queue, thanks!

[1/5] scsi: core: Rework scsi_host_block()
      https://git.kernel.org/mkp/scsi/c/c854bcdf5e18
[2/5] scsi: core: Support setting BLK_MQ_F_BLOCKING
      https://git.kernel.org/mkp/scsi/c/b125bb99559e
[3/5] scsi: ufs: Conditionally enable the BLK_MQ_F_BLOCKING flag
      https://git.kernel.org/mkp/scsi/c/6c03c8e9b729
[4/5] scsi: ufs: Declare ufshcd_{hold,release}() once
      https://git.kernel.org/mkp/scsi/c/4b68b7f9c46d
[5/5] scsi: ufs: Ungate the clock synchronously
      https://git.kernel.org/mkp/scsi/c/078f4f4b34d6