Skip to content

RFC scsi: ufs: add UFS Host Performance Booster(HPB) support

[email protected] linux-scsi lkml oe-kbuild-all 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest posting 2/25 patches 15 repliesIn review
  2. v3 RFC posting 1/25 patches 0 repliesSuperseded
  3. v25 patches 24 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches0 repliesSuperseded

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5scsi; ufs: add device descriptor for Host Performance Boosterdrivers/scsi/ufs/ufs.h drivers/scsi/ufs/ufshcd.c+17 -02 replies
2/5scsi: ufs: make ufshcd_read_unit_desc_param() non-static funcdrivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h+7 -60 replies
3/5scsi: ufs: add ufs_features parameter in structure ufs_dev_infodrivers/scsi/ufs/ufs.h drivers/scsi/ufs/ufshcd.c+4 -02 replies
4/5scsi: ufs: add unit and geometry parameters for HPBdrivers/scsi/ufs/ufs.h+7 -02 replies
5/5scsi: ufs: UFS Host Performance Booster(HPB) driverdrivers/scsi/ufs/Kconfig drivers/scsi/ufs/Makefile drivers/scsi/ufs/ufshcd.c +3 more+3504 -69 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [RESENT PATCH RFC v3 0/5] scsi: ufs: add UFS Host Performance Booster(HPB) support

From: Bean Huo <[email protected]>

Re-sent this patchset since the reference link missed in the cover letter.

This patchset is an RFC to add UFS HPB support in the upstream Linux. Before this series, I have submitted two versions [2] and [4] of UFS HPB driver in the community. The first two series HPB driver patchsets follow the Samsung HPB driver[1] approach, in which the HPB driver submits its HPB READ BUFFER and HPB WRITE BUFFER requests to the SCSI device->request_queueu to execute. Since this fly submission is unacceptable, in this RFC version, I changed it, and now the HPB requests will be directly submitted to UFS device, don't go backwards to SCSI mid-layer. In this approach, the L2P mapping entries loading path will be shorter, and the latency is smaller.

Regarding the UFS HPB feature, which is defined in Jedec Standard Universal Flash (UFS) Host Performance Booster (HPB) Extension Version 1.0, its purpose is to improve read performance by utilizing the host side memory. For the more detail information about HPB, you can refer to the HPB Spec. If the approach in this RFC patchset is accepted and feasible, it is necessary to add a document to detail HPB feature and its implementation later.

Based on the Avri's comments in the second patchset, to be reviewable patches, I shortened HPB driver, deleted HPB host control mode. Also, for change tracing, this patch is RFC v3, including the first two patchsets changes.

This series patch is still based on the [3] branch 5.8/scsi-queue

v2--v3
1. delete GET_BYTE_* and SHIFT_BYTE_* macro definition , using get_unaligned_*()/put_unaligned_*() instead. (Bart Van Assche)
2. change Kconfig help message (Randy Dunlap)
3. delete HPB host control mode code
4. change the way of submission of HPB request, and let the HPB driver directly submit HPB request to UFS.

v1--v2:
1. Rebased the patch on the [3] branch 5.8/scsi-queue
2. Optimized and simplified several functions
3. Add parameter read_threshold in HPB sysfs, by which the user can change read_threshold for the HPB host control mode
4. Add HPB memory limitation, let the user adjust its size according to the system memory capacity

[1] https://github.com/OpenMPDK/HPBDriver
[2] https://www.spinics.net/lists/kernel/msg3449471.html
[3] https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
[4] https://marc.info/?l=linux-scsi&m=158706915110258&w=4

Bean Huo (5):
scsi; ufs: add device descriptor for Host Performance Booster
scsi: ufs: make ufshcd_read_unit_desc_param() non-static func
scsi: ufs: add ufs_features parameter in structure ufs_dev_info
scsi: ufs: add unit and geometry parameters for HPB
scsi: ufs: UFS Host Performance Booster(HPB) driver

 drivers/scsi/ufs/Kconfig  |   62 +
 drivers/scsi/ufs/Makefile |    1 +
 drivers/scsi/ufs/ufs.h    |   15 +
 drivers/scsi/ufs/ufshcd.c |  245 +++-
 drivers/scsi/ufs/ufshcd.h |   28 +-
 drivers/scsi/ufs/ufshpb.c | 2767 +++++++++++++++++++++++++++++++++++++
 drivers/scsi/ufs/ufshpb.h |  423 ++++++
 7 files changed, 3534 insertions(+), 7 deletions(-)
 create mode 100644 drivers/scsi/ufs/ufshpb.c
 create mode 100644 drivers/scsi/ufs/ufshpb.h
Signature · 1 line
2.17.1