From: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
To: linux-block@vger.kernel.org
Cc: axboe@kernel.dk, hch@infradead.org, joseph.qi@linux.alibaba.com
Subject: [RFC] blk-mq: don't plug for HIPRI IO
Date: Tue, 27 Oct 2020 21:29:51 +0800 [thread overview]
Message-ID: <20201027132951.121812-1-xiaoguang.wang@linux.alibaba.com> (raw)
Commit cb700eb3faa4 ("block: don't plug for aio/O_DIRECT HIPRI IO")
only does not call blk_start_plug() or blk_finish_plug for HIPRI IO
in __blkdev_direct_IO(), but if upper layer subsystem, such as io_uring,
still initializes valid plug, block layer may still plug HIPRI IO.
To disable plug for HIPRI IO completely, do it in blk_mq_plug().
Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
---
block/blk-mq.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.h b/block/blk-mq.h
index a52703c..5453d14 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -272,9 +272,11 @@ static inline struct blk_plug *blk_mq_plug(struct request_queue *q,
{
/*
* For regular block devices or read operations, use the context plug
- * which may be NULL if blk_start_plug() was not executed.
+ * which may be NULL if blk_start_plug() was not executed, and don't
+ * plug for HIPRI/polled IO, as those should go straight to issue.
*/
- if (!blk_queue_is_zoned(q) || !op_is_write(bio_op(bio)))
+ if (!(bio->bi_opf & REQ_HIPRI) &&
+ (!blk_queue_is_zoned(q) || !op_is_write(bio_op(bio))))
return current->plug;
/* Zoned block device write operation case: do not plug the BIO */
--
1.8.3.1
next reply other threads:[~2020-10-27 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 13:29 Xiaoguang Wang [this message]
2020-10-27 19:33 ` [RFC] blk-mq: don't plug for HIPRI IO Christoph Hellwig
2020-10-28 14:42 ` Jens Axboe
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=20201027132951.121812-1-xiaoguang.wang@linux.alibaba.com \
--to=xiaoguang.wang@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).