From: "kundan.kumar" <kundan.kumar@samsung.com>
To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de
Cc: linux-block@vger.kernel.org,
Kundan Kumar <kundan.kumar@samsung.com>,
Kanchan Joshi <joshi.k@samsung.com>
Subject: [PATCH] block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io
Date: Thu, 23 Nov 2023 15:54:31 +0530 [thread overview]
Message-ID: <20231123102431.6804-1-kundan.kumar@samsung.com> (raw)
In-Reply-To: CGME20231123103102epcas5p2aee268735dc9e0c357e6d3b98d16fe21@epcas5p2.samsung.com
From: Kundan Kumar <kundan.kumar@samsung.com>
Write-back throttling (WBT) enables QUEUE_FLAG_STATS on the request
queue. But WBT does not make sense for passthrough io, so skip
QUEUE_FLAG_STATS processing.
Also skip rq_qos_issue/done for passthrough io.
Overall, the change gives ~11% hike in peak performance.
Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
---
block/blk-mq.c | 3 ++-
block/blk-rq-qos.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 900c1be1fee1..2de9c14dd43f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1248,7 +1248,8 @@ void blk_mq_start_request(struct request *rq)
trace_block_rq_issue(rq);
- if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
+ if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)
+ && !blk_rq_is_passthrough(rq)) {
rq->io_start_time_ns = ktime_get_ns();
rq->stats_sectors = blk_rq_sectors(rq);
rq->rq_flags |= RQF_STATS;
diff --git a/block/blk-rq-qos.h b/block/blk-rq-qos.h
index f48ee150d667..37245c97ee61 100644
--- a/block/blk-rq-qos.h
+++ b/block/blk-rq-qos.h
@@ -118,7 +118,7 @@ static inline void rq_qos_cleanup(struct request_queue *q, struct bio *bio)
static inline void rq_qos_done(struct request_queue *q, struct request *rq)
{
- if (q->rq_qos)
+ if (q->rq_qos && !blk_rq_is_passthrough(rq))
__rq_qos_done(q->rq_qos, rq);
}
--
2.25.1
next parent reply other threads:[~2023-11-23 11:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231123103102epcas5p2aee268735dc9e0c357e6d3b98d16fe21@epcas5p2.samsung.com>
2023-11-23 10:24 ` kundan.kumar [this message]
2023-11-23 15:30 ` [PATCH] block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io Christoph Hellwig
2023-11-23 18:12 ` Kanchan Joshi
2023-11-23 20:19 ` Jens Axboe
2023-11-23 20:37 ` Jens Axboe
2023-11-24 11:28 ` Kundan Kumar
2023-12-01 12:11 ` Kundan Kumar
2023-12-01 14:31 ` Jens Axboe
2023-11-23 20:07 ` 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=20231123102431.6804-1-kundan.kumar@samsung.com \
--to=kundan.kumar@samsung.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--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