[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1608256903.10163.39.camel@mtkswgap22>
Date: Fri, 18 Dec 2020 10:01:43 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: <daejun7.park@...sung.com>
CC: "avri.altman@....com" <avri.altman@....com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"bvanassche@....org" <bvanassche@....org>,
"huobean@...il.com" <huobean@...il.com>,
ALIM AKHTAR <alim.akhtar@...sung.com>,
Greg KH <gregkh@...uxfoundation.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Sung-Jun Park <sungjun07.park@...sung.com>,
yongmyung lee <ymhungry.lee@...sung.com>,
Jinyoung CHOI <j-young.choi@...sung.com>,
Adel Choi <adel.choi@...sung.com>,
BoRam Shin <boram.shin@...sung.com>,
SEUNGUK SHIN <seunguk.shin@...sung.com>
Subject: Re: Subject: [PATCH v14 1/3] scsi: ufs: Introduce HPB feature
Hi Daejun,
On Wed, 2020-12-16 at 11:45 +0900, Daejun Park wrote:
> This is a patch for the HPB initialization and adds HPB function calls to
> UFS core driver.
>
> NAND flash-based storage devices, including UFS, have mechanisms to
> translate logical addresses of IO requests to the corresponding physical
> addresses of the flash storage.
> In UFS, Logical-address-to-Physical-address (L2P) map data, which is
> required to identify the physical address for the requested IOs, can only
> be partially stored in SRAM from NAND flash. Due to this partial loading,
> accessing the flash address area where the L2P information for that address
> is not loaded in the SRAM can result in serious performance degradation.
>
> The basic concept of HPB is to cache L2P mapping entries in host system
> memory so that both physical block address (PBA) and logical block address
> (LBA) can be delivered in HPB read command.
> The HPB READ command allows to read data faster than a read command in UFS
> since it provides the physical address (HPB Entry) of the desired logical
> block in addition to its logical address. The UFS device can access the
> physical block in NAND directly without searching and uploading L2P mapping
> table. This improves read performance because the NAND read operation for
> uploading L2P mapping table is removed.
>
> In HPB initialization, the host checks if the UFS device supports HPB
> feature and retrieves related device capabilities. Then, some HPB
> parameters are configured in the device.
>
> Reviewed-by: Bart Van Assche <bvanassche@....org>
> Reviewed-by: Can Guo <cang@...eaurora.org>
> Acked-by: Avri Altman <Avri.Altman@....com>
> Tested-by: Bean Huo <beanhuo@...ron.com>
> Signed-off-by: Daejun Park <daejun7.park@...sung.com>
> ---
> Documentation/ABI/testing/sysfs-driver-ufs | 80 +++
> drivers/scsi/ufs/Kconfig | 9 +
> drivers/scsi/ufs/Makefile | 1 +
> drivers/scsi/ufs/ufs-sysfs.c | 18 +
> drivers/scsi/ufs/ufs.h | 13 +
> drivers/scsi/ufs/ufshcd.c | 48 ++
> drivers/scsi/ufs/ufshcd.h | 23 +-
> drivers/scsi/ufs/ufshpb.c | 562 +++++++++++++++++++++
> drivers/scsi/ufs/ufshpb.h | 167 ++++++
> 9 files changed, 920 insertions(+), 1 deletion(-)
> create mode 100644 drivers/scsi/ufs/ufshpb.c
> create mode 100644 drivers/scsi/ufs/ufshpb.h
>
> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs b/Documentation/ABI/testing/sysfs-driver-ufs
> index d1a352194d2e..8b16a353392c 100644
> --- a/Documentation/ABI/testing/sysfs-driver-ufs
> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
> @@ -1019,3 +1019,83 @@ Contact: Asutosh Das <asutoshd@...eaurora.org>
> Description: This entry shows the configured size of WriteBooster buffer.
> 0400h corresponds to 4GB.
> The file is read only.
> +
> +What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
> +Date: December 2020
> +Contact: Daejun Park <daejun7.park@...sung.com>
> +Description: This entry shows the HPB specification version.
> + The full information about the descriptor could be found at UFS
> + HPB (Host Performance Booster) Extension specifications.
> + Example: version 1.2.3 = 0123h
> + The file is read only.
> +
> +What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_control
> +Date: December 2020
> +Contact: Daejun Park <daejun7.park@...sung.com>
> +Description: This entry shows an indication of the HPB control mode.
> + 00h: Host control mode
> + 01h: Device control mode
> + The file is read only.
> +
> +What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_region_size
> +Date: December 2020
> +Contact: Daejun Park <daejun7.park@...sung.com>
> +Description: This entry shows the bHPBRegionSize which can be calculated
> + as in the following (in bytes):
> + HPB Region size = 512B * 2^bHPBRegionSize
> + The file is read only.
> +
> +What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
> +Date: December 2020
> +Contact: Daejun Park <daejun7.park@...sung.com>
> +Description: This entry shows the maximum number of HPB LU supported by
> + the device.
> + 00h: HPB is not supported by the device.
> + 01h ~ 20h: Maximum number of HPB LU supported by the device
> + The file is read only.
> +
> +What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
> +Date: December 2020
> +Contact: Daejun Park <daejun7.park@...sung.com>
> +Description: This entry shows the maximum number of HPB LU supported by
> + the device.
> + 00h: HPB is not supported by the device.
> + 01h ~ 20h: Maximum number of HPB LU supported by the device
> + The file is read only.
Please remove above duplicated item.
Thanks,
Stanley Chu
Powered by blists - more mailing lists