mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bean Huo <huobean@gmail.com>
To: Avri Altman <avri.altman@wdc.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bart Van Assche <bvanassche@acm.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Bean Huo <beanhuo@micron.com>,
	Daejun Park <daejun7.park@samsung.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v3] scsi: ufshpb: Opt out pre-reqs from HPB2.0 flows
Date: Sat, 30 Oct 2021 09:15:19 +0200	[thread overview]
Message-ID: <0f81b6d74a6bde6606ac93e20b65cc59b9bed5df.camel@gmail.com> (raw)
In-Reply-To: <20211030062301.248-1-avri.altman@wdc.com>

On Sat, 2021-10-30 at 09:23 +0300, Avri Altman wrote:
> v1 -> v2:
> 
>  - forgot to remove ufshpb_set_write_buf_cmd
> 
> 
> 
> v2 -> v3:
> 
>  - restore bMAX_ DATA_SIZE_FOR_HPB_SINGLE_CMD
> 
>  - remove read_id - it is now always 0
> 
>  - Ignore ufshpb_prep returned error - does not return -EAGAIN no
> more
> 
> 
> 
> HPB allows its read commands to carry the physical addresses along
> with
> 
> the LBAs, thus allowing less internal L2P-table switches in the
> device.
> 
> HPB1.0 allowed a single LBA, while HPB2.0 increases this capacity up
> to
> 
> 255 blocks.
> 
> 
> 
> Carrying more than a single record, the read operation is no longer
> 
> of type "read" per-se, but some sort of a "hybrid" command - writing
> the
> 
> physical address to the device and reading the required payload.
> 
> 
> 
> The HPB JEDEC spec came-up with a dual-command for that operation:
> 
> HPB-WRITE-BUFFER (0x2) to write the physical addresses to device, and
> 
> HPB-READ to read the payload.
> 
> 
> 
> Alas, the current HPB driver design - a single-scsi-LLD-module, has
> no
> 
> other alternative but to spawn the READ10 command into 2 commands:
> 
> HPB-WRITE-BUFFER and HPB-READ.
> 
> This causes a grat deal of aggrevation to the block layer guys, up to
> a
> 
> point, in which that they were willing to revert the entire HPB
> driver,
> 
> regardless of the huge amount of corporate effort already inversted
> in
> 
> it.
> 
> 
> 
> Therefore, remove the pre-req API for now, as a matter of urgency to
> get
> 
> it done before the closing of the merge window.
> 
> 
> 
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com
> >
> 
> Signed-off-by: Avri Altman <avri.altman@wdc.com>
> 
> Tested-by: Avri Altman <avri.altman@wdc.com>
> 
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> 
> ---
> 
>  drivers/scsi/ufs/ufshcd.c |   7 +-
> 
>  drivers/scsi/ufs/ufshpb.c | 283 +-----------------------------------
> --
> 
>  drivers/scsi/ufs/ufshpb.h |   2 -
> 
>  3 files changed, 4 insertions(+), 288 deletions(-)
> 
> 
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> 
> index f5ba8f953b87..470affdec426 100644
> 
> --- a/drivers/scsi/ufs/ufshcd.c
> 
> +++ b/drivers/scsi/ufs/ufshcd.c
> 
> @@ -2767,12 +2767,7 @@ static int ufshcd_queuecommand(struct
> Scsi_Host *host, struct scsi_cmnd *cmd)
> 
>  
> 
>         lrbp->req_abort_skip = false;
> 
>  
> 
> -       err = ufshpb_prep(hba, lrbp);
> 
> -       if (err == -EAGAIN) {
> 
> -               lrbp->cmd = NULL;
> 
> -               ufshcd_release(hba);
> 
> -               goto out;
> 
> -       }
> 
> +       ufshpb_prep(hba, lrbp);


it is better to add one line comment to highlight that HPB preperation
failure will not impact original read request.

Reviewed-by: Bean Huo <beanhuo@micron.com>
Tested-by: Bean Huo <beanhuo@micron.com>


Bean


 


  reply	other threads:[~2021-10-30  7:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30  6:23 Avri Altman
2021-10-30  7:15 ` Bean Huo [this message]
2021-10-30 10:12   ` Avri Altman
2021-10-30 10:57     ` Avri Altman
2021-10-30 14:06       ` Martin K. Petersen
2021-10-30 14:04 ` Martin K. Petersen

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=0f81b6d74a6bde6606ac93e20b65cc59b9bed5df.camel@gmail.com \
    --to=huobean@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=daejun7.park@samsung.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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 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®