All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	alim.akhtar@samsung.com, avri.altman@wdc.com,
	linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
	Daejun Park <daejun7.park@samsung.com>
Subject: Re: [PATCH] scsi: ufs: mark HPB support as BROKEN
Date: Thu, 28 Oct 2021 09:32:16 +0800	[thread overview]
Message-ID: <YXn9oENzCzzeGENV@T590> (raw)
In-Reply-To: <b0149856-4582-a3c0-a206-9b0fbf13854e@acm.org>

On Wed, Oct 27, 2021 at 10:01:42AM -0700, Bart Van Assche wrote:
> On 10/27/21 9:16 AM, Martin K. Petersen wrote:
> > Given that HPB developed over time, I am not sure how simple a revert
> > would be. And we only have a couple of days left before release. I
> > really want the smallest patch possible that either removes or disables
> > the 2.0 support.
> 
> How about one of the untested patches below?
> 
> The patch below disables support for HPB 2.0 by ignoring the HPB version reported
> by the UFS controller:
> 
> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
> index 66b19500844e..5f9f7139480a 100644
> --- a/drivers/scsi/ufs/ufshpb.c
> +++ b/drivers/scsi/ufs/ufshpb.c
> @@ -2872,8 +2872,8 @@ void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf)
>  		return;
>  	}
> 
> -	if (version == HPB_SUPPORT_LEGACY_VERSION)
> -		hpb_dev_info->is_legacy = true;
> +	/* Do not use HPB 2.0 because of the blk_insert_cloned_request() call. */
> +	hpb_dev_info->is_legacy = true;

I guess you may change ufshpb_is_required_wb() to return false simply
with comment.

> 
>  	ret = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
>  		QUERY_ATTR_IDN_MAX_HPB_SINGLE_CMD, 0, 0, &max_hpb_single_cmd);
> 
> 
> The second patch changes the blk_insert_cloned_request() call into a
> blk_execute_rq_nowait() call. That should work fine since this function
> bypasses the I/O scheduler for passthrough requests:

Either ->is_legacy is set as true or ufshpb_is_required_wb() returns
false, blk_insert_cloned_request() won't be called. But here
blk_execute_rq_nowait() should be used since it is one driver private IO.

That also shows the private command of pre_req is run concurrently with the
original FS IO, and two tags are consumed for doing one IO. It could be done
one by one, but I guess it is a bit slower, just saw Daejun replied this point.


thanks,
Ming


  reply	other threads:[~2021-10-28  1:32 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  7:12 [PATCH] scsi: ufs: mark HPB support as BROKEN Christoph Hellwig
2021-10-26  7:18 ` Hannes Reinecke
2021-10-26  7:24 ` Damien Le Moal
2021-10-26 13:04   ` James Bottomley
2021-10-26 16:36 ` Bart Van Assche
2021-10-26 17:19   ` James Bottomley
2021-10-26 17:25     ` Jens Axboe
2021-10-26 18:05       ` Bart Van Assche
2021-10-26 18:10         ` Jens Axboe
2021-10-26 18:18           ` James Bottomley
2021-10-26 18:27             ` Martin K. Petersen
2021-10-26 20:10               ` Bart Van Assche
2021-10-26 22:22                 ` Daejun Park
2021-10-27  5:27                 ` Christoph Hellwig
2021-10-27 12:20                   ` James Bottomley
2021-10-28 20:21                     ` Bart Van Assche
2021-10-28 20:33                       ` James Bottomley
2021-10-28 20:53                         ` Bart Van Assche
2021-10-28 21:14                           ` Daejun Park
2021-10-27 13:16                   ` Bart Van Assche
2021-10-27 14:12                     ` Keith Busch
2021-10-27 14:38                       ` Jens Axboe
2021-10-27 14:43                         ` James Bottomley
2021-10-27 15:03                       ` Ming Lei
2021-10-27 15:06                         ` Jens Axboe
2021-10-27 15:16                           ` Ming Lei
2021-10-27 15:44                             ` Martin K. Petersen
2021-10-27 15:58                               ` Ming Lei
2021-10-27 16:16                                 ` Keith Busch
2021-10-27 16:19                                   ` Jens Axboe
2021-10-28  0:42                                   ` Ming Lei
2021-10-28  1:10                                     ` Daejun Park
2021-10-28  2:07                                       ` Ming Lei
2021-10-27 16:59                                 ` Martin K. Petersen
2021-10-27 15:35                           ` Martin K. Petersen
2021-10-27 15:40                             ` Jens Axboe
2021-10-27 16:16                               ` Martin K. Petersen
2021-10-27 17:01                                 ` Bart Van Assche
2021-10-28  1:32                                   ` Ming Lei [this message]
2021-10-29 10:53 ` Christoph Hellwig
2021-10-29 11:39   ` James Bottomley
2021-10-29 13:35     ` Avri Altman
2021-10-29 13:44       ` James Bottomley

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=YXn9oENzCzzeGENV@T590 \
    --to=ming.lei@redhat.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=daejun7.park@samsung.com \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@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 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.