public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@lst.de>, Ming Lei <ming.lei@redhat.com>
Cc: linux-block@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] blk-mq: setup blk_mq_alloc_data.cmd_flags after submit_bio_checks() is done
Date: Fri, 12 Nov 2021 08:41:22 -0700	[thread overview]
Message-ID: <0eb6236f-d428-5869-a632-919fa07dc172@kernel.dk> (raw)
In-Reply-To: <20211112084441.GA32120@lst.de>

On 11/12/21 1:44 AM, Christoph Hellwig wrote:
> On Fri, Nov 12, 2021 at 04:37:19PM +0800, Ming Lei wrote:
>>> can only be used for reads, and no fua can be set if the preallocating
>>> I/O didn't use fua, etc.
>>>
>>> What are the pitfalls of just chanigng cmd_flags?
>>
>> Then we need to check cmd_flags carefully, such as hctx->type has to
>> be same, flush & passthrough flags has to be same, that said all
>> ->cmd_flags used for allocating rqs have to be same with the following
>> bio->bi_opf.
>>
>> In usual cases, I guess all IOs submitted from same plug batch should be
>> same type. If not, we can switch to change cmd_flags.
> 
> Jens: is this a limit fitting into your use cases?

It's not a big problem for my use case, as that ones all the same type
of IO. And in general I don't expect a lot of mixed uses here, I guess
the main issue might be a plug for writes and an initial meta data read
will "polute" the request cache with requests that we won't be using.
But probably not a big enough thing to worry about in terms of
efficiency.

> I guess as a quick fix this rejecting different flags is probably the
> best we can do for now, but I suspect we'll want to eventually relax
> them.

Agree on both.

-- 
Jens Axboe


      parent reply	other threads:[~2021-11-12 15:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12  8:11 [PATCH] blk-mq: setup blk_mq_alloc_data.cmd_flags after submit_bio_checks() is done Ming Lei
2021-11-12  8:21 ` Christoph Hellwig
2021-11-12  8:37   ` Ming Lei
2021-11-12  8:44     ` Christoph Hellwig
2021-11-12 12:47       ` Ming Lei
2021-11-12 13:49         ` Geert Uytterhoeven
2021-11-12 15:47         ` Jens Axboe
2021-11-12 16:05           ` Ming Lei
2021-11-12 16:08             ` Jens Axboe
2021-11-12 16:17               ` Ming Lei
2021-11-12 16:30                 ` Jens Axboe
2021-11-12 15:41       ` Jens Axboe [this message]

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=0eb6236f-d428-5869-a632-919fa07dc172@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=geert@linux-m68k.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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