All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bean Huo <huobean@gmail.com>
To: Jiaming Li <lijiamingsofine@gmail.com>,
	avri.altman@wdc.com, alim.akhtar@samsung.com, jejb@linux.ibm.com,
	bvanassche@acm.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	lijiaming3 <lijiaming3@xiaomi.com>
Subject: Re: [PATCH] scsi: ufs: ufsfbo: Introduce File Based Optimization feature
Date: Wed, 24 Aug 2022 16:16:35 +0200	[thread overview]
Message-ID: <347dae29c07fe13e6974b0e59e127c399f63ef69.camel@gmail.com> (raw)
In-Reply-To: <20220824084633.14428-1-lijiamingsofine@gmail.com>

On Wed, 2022-08-24 at 16:46 +0800, Jiaming Li wrote:
> From: lijiaming3 <lijiaming3@xiaomi.com>
> 
> Implement File Based Optimization initialization and add sysfs
> interface.
> 
> Stoage devices have a long lifespan. Device performance over its
> lifespan is not constant and may deteriorate over time
> 
> This feature describes a method to improve the performance
> regression.
> The host needs to provide File System information to storage device
> first. Based on that information device analyzes the file system data
> and provides the host the level of performance regression. The host
> then may instruct the device to execute optimization procedure to
> improve the regression level.
> 
> Signed-off-by: lijiaming3 <lijiaming3@xiaomi.com>
> ---
>  arch/arm64/configs/defconfig |    1 +
>  drivers/scsi/ufs/Kconfig     |    9 +
>  drivers/scsi/ufs/Makefile    |    1 +
>  drivers/scsi/ufs/ufs.h       |   13 +
>  drivers/scsi/ufs/ufsfbo.c    | 1007
> ++++++++++++++++++++++++++++++++++
>  drivers/scsi/ufs/ufsfbo.h    |  143 +++++
>  drivers/scsi/ufs/ufshcd.c    |   15 +
>  drivers/scsi/ufs/ufshcd.h    |    7 +-
>  8 files changed, 1195 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/scsi/ufs/ufsfbo.c
>  create mode 100644 drivers/scsi/ufs/ufsfbo.h
> 
> diff --git a/arch/arm64/configs/defconfig
> b/arch/arm64/configs/defconfig
> index 4972a81d40d6..1363c237b6f3 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -289,6 +289,7 @@ CONFIG_SCSI_UFSHCD_PLATFORM=y
>  CONFIG_SCSI_UFS_QCOM=m
>  CONFIG_SCSI_UFS_HISI=y
>  CONFIG_SCSI_UFS_EXYNOS=y
> +CONFIG_SCSI_UFS_FBO=y
>  CONFIG_ATA=y
>  CONFIG_SATA_AHCI=y
>  CONFIG_SATA_AHCI_PLATFORM=y
> diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
> index 432df76e6318..57b0e8b14543 100644
> --- a/drivers/scsi/ufs/Kconfig
> +++ b/drivers/scsi/ufs/Kconfig
> @@ -199,3 +199,12 @@ config SCSI_UFS_FAULT_INJECTION
>         help
>           Enable fault injection support in the UFS driver. This
> makes it easier
>           to test the UFS error handler and abort handler.
> +
> +config SCSI_UFS_FBO
> +       bool "Support UFS File-based Optimization"
> +       depends on SCSI_UFSHCD
> +       help
> +        The UFS FBO feature improves Sequential read performance.
> The Host can
> +        send the LBA to device. The device will return a fragmented
> state. It
> +        is up to the host to decide whether to defrag. After
> defragment,
> +        Sequential read performance is improved
> \ No newline at end of file
> diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile
> index c407da9b5171..956be0738263 100644
> --- a/drivers/scsi/ufs/Makefile
> +++ b/drivers/scsi/ufs/Makefile
> @@ -9,6 +9,7 @@ ufshcd-core-$(CONFIG_DEBUG_FS)          += ufs-
> debugfs.o
>  ufshcd-core-$(CONFIG_SCSI_UFS_BSG)     += ufs_bsg.o
>  ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO)  += ufshcd-crypto.o
>  ufshcd-core-$(CONFIG_SCSI_UFS_HPB)     += ufshpb.o
> +ufshcd-core-$(CONFIG_SCSI_UFS_FBO)     += ufsfbo.o
>  ufshcd-core-$(CONFIG_SCSI_UFS_FAULT_INJECTION) += ufs-fault-
> injection.o
>  
>  obj-$(CONFIG_SCSI_UFS_DWC_TC_PCI) += tc-dwc-g210-pci.o ufshcd-dwc.o
> tc-dwc-g210.o
> diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
> index 8c6b38b1b142..b750ce3f7de9 100644
> --- a/drivers/scsi/ufs/ufs.h
> +++ b/drivers/scsi/ufs/ufs.h
> @@ -170,6 +170,7 @@ enum desc_idn {
>         QUERY_DESC_IDN_GEOMETRY         = 0x7,
>         QUERY_DESC_IDN_POWER            = 0x8,
>         QUERY_DESC_IDN_HEALTH           = 0x9,
> +       QUERY_DESC_IDN_FBO          = 0xA,
Hi Jiaming, 

Is this a UFS extended standard or vendor specific feature?




  reply	other threads:[~2022-08-24 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  8:46 [PATCH] scsi: ufs: ufsfbo: Introduce File Based Optimization feature Jiaming Li
2022-08-24 14:16 ` Bean Huo [this message]
2022-08-24 15:26   ` 答复: [External Mail]Re: " 李佳铭
2022-08-24 16:17     ` Bean Huo
2022-08-24 16:40   ` Bart Van Assche
2022-08-24 16:35 ` Bart Van Assche
2022-08-25  8:42 ` Avri Altman
2022-08-25  8:56 ` Avri Altman
2022-08-25 12:10   ` 答复: [External Mail]RE: " 李佳铭
2022-08-25 12:16     ` Avri Altman
2022-08-26 22:00 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=347dae29c07fe13e6974b0e59e127c399f63ef69.camel@gmail.com \
    --to=huobean@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=lijiaming3@xiaomi.com \
    --cc=lijiamingsofine@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.