mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/3] scsi: ufs: Allow RTT negotiation
@ 2024-05-16  5:51 Avri Altman
  2024-05-16  5:51 ` [PATCH v4 1/3] " Avri Altman
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Avri Altman @ 2024-05-16  5:51 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Bart Van Assche, Bean Huo, Peter Wang, linux-scsi, linux-kernel,
	Avri Altman

The rtt-upiu packets precede any data-out upiu packets, thus
synchronizing the data input to the device: this mostly applies to write
operations, but there are other operations that requires rtt as well.

There are several rules binding this rtt - data-out dialog, specifically
There can be at most outstanding bMaxNumOfRTT such packets.  This might
have an effect on write performance (sequential write in particular), as
each data-out upiu must wait for its rtt sibling.

UFSHCI expects bMaxNumOfRTT to be min(bDeviceRTTCap, NORTT). However,
as of today, there does not appears to be no-one who sets it: not the
host controller nor the driver.  It wasn't an issue up to now:
bMaxNumOfRTT is set to 2 after manufacturing, and wasn't limiting the
write performance.

UFS4.0, and specifically gear 5 changes this, and requires the device to
be more attentive.  This doesn't come free - the device has to allocate
more resources to that end, but the sequential write performance
improvement is significant. Early measurements shows 25% gain when
moving from rtt 2 to 9. Therefore, set bMaxNumOfRTT to be
min(bDeviceRTTCap, NORTT) as UFSHCI expects.

v3 -> v4:
Allow bMaxNumOfRTT to be configured via sysfs (Bart)

v2 -> v3:
Allow platform vendors to take precedence having their own rtt
negotiation mechanism (Peter)

v1 -> v2:
bMaxNumOfRTT is a Persistent attribute - do not override if it was
written (Bean)

Avri Altman (3):
  scsi: ufs: Allow RTT negotiation
  scsi: ufs: Allow platform vendors to set rtt
  scsi: ufs: sysfs: Make max_number_of_rtt read-write

 Documentation/ABI/testing/sysfs-driver-ufs | 14 +++---
 drivers/ufs/core/ufs-sysfs.c               | 58 +++++++++++++++++++++-
 drivers/ufs/core/ufshcd.c                  | 39 +++++++++++++++
 include/ufs/ufshcd.h                       |  4 ++
 include/ufs/ufshci.h                       |  1 +
 5 files changed, 109 insertions(+), 7 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-05-16 23:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-16  5:51 [PATCH v4 0/3] scsi: ufs: Allow RTT negotiation Avri Altman
2024-05-16  5:51 ` [PATCH v4 1/3] " Avri Altman
2024-05-16 14:28   ` Bart Van Assche
2024-05-16 15:21     ` Avri Altman
2024-05-16 16:04       ` Bart Van Assche
2024-05-16 23:56         ` Avri Altman
2024-05-16  5:51 ` [PATCH v4 2/3] scsi: ufs: Allow platform vendors to set rtt Avri Altman
2024-05-16 14:12   ` Bart Van Assche
2024-05-16 15:23     ` Avri Altman
2024-05-16  5:51 ` [PATCH v4 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write Avri Altman
2024-05-16 14:17   ` Bart Van Assche
2024-05-16 15:31     ` Avri Altman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®