Skip to content

Commit 847c5bc

Browse files
Kundan Kumaraxboe
authored andcommitted
block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io
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 <[email protected]> Signed-off-by: Kanchan Joshi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 8fadb86 commit 847c5bc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

block/blk-mq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,8 @@ void blk_mq_start_request(struct request *rq)
12481248

12491249
trace_block_rq_issue(rq);
12501250

1251-
if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
1251+
if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags) &&
1252+
!blk_rq_is_passthrough(rq)) {
12521253
rq->io_start_time_ns = ktime_get_ns();
12531254
rq->stats_sectors = blk_rq_sectors(rq);
12541255
rq->rq_flags |= RQF_STATS;

block/blk-rq-qos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static inline void rq_qos_cleanup(struct request_queue *q, struct bio *bio)
118118

119119
static inline void rq_qos_done(struct request_queue *q, struct request *rq)
120120
{
121-
if (q->rq_qos)
121+
if (q->rq_qos && !blk_rq_is_passthrough(rq))
122122
__rq_qos_done(q->rq_qos, rq);
123123
}
124124

0 commit comments

Comments
 (0)