All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Christoph Hellwig <hch@lst.de>,
	martin.petersen@oracle.com, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: alim.akhtar@samsung.com, avri.altman@wdc.com,
	linux-scsi@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: mark HPB support as BROKEN
Date: Tue, 26 Oct 2021 11:05:33 -0700	[thread overview]
Message-ID: <4438ab72-7da0-33de-ecc9-91c3c179eca7@acm.org> (raw)
In-Reply-To: <870e986c-08dd-2fa2-a593-0f97e10d6df5@kernel.dk>

On 10/26/21 10:25 AM, Jens Axboe wrote:
> On 10/26/21 11:19 AM, James Bottomley wrote:
>> On Tue, 2021-10-26 at 09:36 -0700, Bart Van Assche wrote:
>>> On 10/26/21 12:12 AM, Christoph Hellwig wrote:
>>>> The HPB support added this merge window is fundanetally flawed as
>>>> it
>>>                                                ^^^^^^^^^^^^
>>>                                                fundanetally ->
>>> fundamentally
>>>
>>> Since the implementation can be reworked not to use
>>> blk_insert_cloned_request() I'm not sure using the word
>>> "fundamentally" is appropriate.
>>
>> I'm not so sure about that.  The READ BUFFER implementation runs from a
>> work queue and looks fine.  The WRITE BUFFER implementation is trying
>> to spawn a second command to precede the queued command which is a
>> fundamental problem for the block API.  It's not clear to me that the
>> WRITE BUFFER can be fixed because of the tying to the sent command ...
>> but like I said, the standard is proprietary so I can't look at it to
>> see if there are alternative ways of achieving the same effect.
> 
> Is there a model in which this can actually work? If not, or if we
> aren't sure, I think we'd be better off just reverting the parts
> involved with that block layer misuse. Simply marking it broken is a
> half measure that doesn't really solve anything (except send a message).
> 
> IMHO, it should be reverted and the clone usage we currently export be
> moved into dm for now. That'll prevent further abuse of this in the
> future.

Hi Jens and James,

This is what I found in the HPB 2.0 specification (the spec is
copyrighted but I assume that I have the right to quote small parts of
that spec):

<quote>
6.3 HPB WRITE BUFFER Command

HPB WRITE BUFFER command have following 3 different function depending
on the value of BUFFER_ID field.
1) Inactivating an HPB Region (supported in host control mode only)
2) prefetching HPB Entries from the host to the device (supported in any
    control mode)
3) Inactivating all HPB Regions, except for Provisioning Pinned Region
    in the host (supported in device control mode only)
</quote>

Reverting only the problematic code (HPB 2.0) sounds reasonable to me
because reworking the HPB 2.0 code will be nontrivial. Using
BLK_MQ_F_BLOCKING might be a viable approach. However, I don't want to
see that flag enabled in the UFS driver if HPB is not used because of
the negative performance effects of that flag.

Thanks,

Bart.

  reply	other threads:[~2021-10-26 18:05 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 [this message]
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-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
     [not found]                         ` <CGME20211028205342epcas2p40838e84438572adf052d106dc82e35ff@epcms2p6>
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
     [not found]                                   ` <CGME20211028004244epcas2p1f2212bf94ef861dfa6cd082c3cbb1803@epcms2p1>
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
     [not found]               ` <CGME20211026201057epcas2p4174ba542fd5abe7ec8f4469f8c60303a@epcms2p7>
2021-10-26 22:22                 ` Daejun Park
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=4438ab72-7da0-33de-ecc9-91c3c179eca7@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jaegeuk@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.