All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pankaj Raghav <p.raghav@samsung.com>,
	Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, damien.lemoal@opensource.wdc.com,
	gost.dev@samsung.com
Subject: Re: [PATCH 1/2] block: modify blk_mq_plug() to allow only reads for zoned block devices
Date: Mon, 26 Sep 2022 13:25:32 -0600	[thread overview]
Message-ID: <350366c3-1014-ac32-149f-689134631d73@kernel.dk> (raw)
In-Reply-To: <a943acf8-f367-a1ba-0d57-2948a3ade6f4@samsung.com>

On 9/26/22 1:20 PM, Pankaj Raghav wrote:
> On 2022-09-26 18:32, Jens Axboe wrote:
>> On 9/26/22 8:43 AM, Christoph Hellwig wrote:
>>> On Mon, Sep 26, 2022 at 08:40:54AM -0600, Jens Axboe wrote:
>>>> On 9/26/22 8:37 AM, Christoph Hellwig wrote:
>>>>> On Sun, Sep 25, 2022 at 08:53:46PM +0200, Pankaj Raghav wrote:
>>>>>> Modify blk_mq_plug() to allow plugging only for read operations in zoned
>>>>>> block devices as there are alternative IO paths in the linux block
>>>>>> layer which can end up doing a write via driver private requests in
>>>>>> sequential write zones.
>>>>>
>>>>> We should be able to plug for all operations that are not
>>>>> REQ_OP_ZONE_APPEND just fine.
>>>>
>>>> Agree, I think we just want to make this about someone doing a series
>>>> of appends. If you mix-and-match with passthrough you will have a bad
>>>> time anyway.
>>>
>>> Err, sorry - what I wrote about is compelte garbage.  I initially
>>> wanted to say you can plug for REQ_OP_ZONE_APPEND just fine, and then
>>> realized that we also want various other ones that have the write bit
>>> set batched.  So I suspect we really want to explicitly check for
>>> REQ_OP_WRITE here.
>>
>> My memory was a bit hazy, since we have separate ops for the driver
>> in/out, I think just checking for REQ_OP_WRITE is indeed the right
>> choice. That's the single case we need to care about.
>>
> Ah. You are right. I missed it as well. There is even a comment from
> Christoph:
> 
>  *   - if the least significant bit is set transfers are TO the device
>  *   - if the least significant bit is not set transfers are FROM the device
> 
> I guess the second patch should be enough to apply plugging when
> applicable for uring_cmd based nvme passthrough requests.

Do we even need the 2nd patch? If we're just doing passthrough for the
blk_execute_nowait() API, then the condition should never trigger? If
so, then it would be a cleanup just to ensure we're using a consistent
API for getting the plug, which may be worthwhile to do separately for
sure.

-- 
Jens Axboe

  reply	other threads:[~2022-09-26 19:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220925185349eucas1p1dc689bac64668ca038ba8646c44fd580@eucas1p1.samsung.com>
2022-09-25 18:53 ` [PATCH 0/2] enable plugging only for reads in zoned block devices Pankaj Raghav
2022-09-25 18:53   ` [PATCH 1/2] block: modify blk_mq_plug() to allow only reads for " Pankaj Raghav
2022-09-25 22:55     ` Damien Le Moal
2022-09-26 14:37     ` Christoph Hellwig
2022-09-26 14:40       ` Jens Axboe
2022-09-26 14:43         ` Christoph Hellwig
2022-09-26 16:32           ` Jens Axboe
2022-09-26 19:20             ` Pankaj Raghav
2022-09-26 19:25               ` Jens Axboe [this message]
2022-09-27 15:20                 ` Pankaj Raghav
2022-09-27 16:04                   ` Jens Axboe
2022-09-27 16:51                     ` Christoph Hellwig
2022-09-27 16:52                       ` Jens Axboe
2022-09-27 23:07                         ` Damien Le Moal
2022-09-27 23:10                           ` Damien Le Moal
2022-09-27 23:13                             ` Jens Axboe
2022-09-27 23:12                           ` Jens Axboe
2022-09-27 23:35                             ` Damien Le Moal
2022-09-28 11:57                         ` Pankaj Raghav
2022-09-28 22:19                           ` Damien Le Moal
2022-09-25 18:53   ` [PATCH 2/2] block: use blk_mq_plug() in blk_execute_rq_nowait() Pankaj Raghav
2022-09-25 22:56     ` Damien Le Moal

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=350366c3-1014-ac32-149f-689134631d73@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=gost.dev@samsung.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=p.raghav@samsung.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.