From: Pankaj Raghav <pankydev8@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH] block: Submit flush requests to the I/O scheduler
Date: Mon, 15 Aug 2022 11:06:06 +0200 [thread overview]
Message-ID: <20220815090606.lygbriic32tks45l@quentin> (raw)
In-Reply-To: <09689854-b7b7-9a5c-cda7-f1f4de42b5fe@acm.org>
On Sun, Aug 14, 2022 at 04:44:31PM -0700, Bart Van Assche wrote:
> I agree that blk_mq_submit_bio() does not plug writes to zoned drives
> because of the following code in blk_mq_plug():
>
> /* Zoned block device write operation case: do not plug the BIO */
> if (bdev_is_zoned(bio->bi_bdev) && op_is_write(bio_op(bio)))
> return NULL;
>
> However, I have not found any code in blk_execute_rq_nowait() that causes
> the plugging mechanism to be skipped for zoned writes. Did I perhaps
> overlook something? The current blk_execute_rq_nowait() implementation is as
> follows:
>
IIUC, blk_execute_rq_nowait() is used mainly by lower level drivers to send
commands but current->plug is not initialized with blk_start_plug() in those
drivers. So, the rqs are not added to the plug list.
I did a quick test with fio with the new uring_cmd IO path that uses
blk_execute_rq_nowait() and it never plugged the rqs.
fio --filename=/dev/ng0n3 --size=128M --rw=write --bs=4k --zonemode=zbd --ioengine=io_uring_cmd --name=zoned
Did you notice it otherwise?
But I think it is better if we change current->plug to blk_mq_plug() to
be on the safer side.
> void blk_execute_rq_nowait(struct request *rq, bool at_head)
> {
> WARN_ON(irqs_disabled());
> WARN_ON(!blk_rq_is_passthrough(rq));
>
> blk_account_io_start(rq);
> if (current->plug)
> blk_add_rq_to_plug(current->plug, rq);
> else
> blk_mq_sched_insert_request(rq, at_head, true, false);
> }
>
> Thanks,
>
> Bart.
--
Pankaj Raghav
next prev parent reply other threads:[~2022-08-15 9:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 21:03 [PATCH] block: Submit flush requests to the I/O scheduler Bart Van Assche
2022-08-13 6:41 ` Christoph Hellwig
2022-08-14 17:13 ` Damien Le Moal
2022-08-14 23:44 ` Bart Van Assche
2022-08-15 9:06 ` Pankaj Raghav [this message]
2022-08-15 16:31 ` 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=20220815090606.lygbriic32tks45l@quentin \
--to=pankydev8@gmail.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hch@lst.de \
--cc=jaegeuk@kernel.org \
--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