Skip to contentSkip to conversation

block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io

PATCH Applied kundan.kumar 2 participants 2 messages Nov 24, 2023 – Dec 1, 2023 1 message not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20231123191010epcas5p2b775f5b179ac02c3930d2274e3225d76@epcas5p2.samsung.com

#1 lore raw

PATCH v2 1/1 block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io

From: Kundan Kumar <[email protected]>

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.

---
Changes since v1:
- Fix coding style

 block/blk-mq.c     | 3 ++-
 block/blk-rq-qos.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
block/blk-mq.c +2 -1
index 900c1be1fee1..fb29ff5cc281 100644
@@ -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;
block/blk-rq-qos.h +1 -1
index f48ee150d667..37245c97ee61 100644
@@ -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);
 }
 
Signature · 1 line
2.25.1
maintainer Applied
#2 lore raw
Quoted 9 lines · kundan.kumar

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.

[...]

Applied, thanks!

[1/1] block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io

      commit: 6e2d4b77c252b6f6e47dadf1ceaeee4ebe97eff4

Best regards,

Signature · 1 line
Jens Axboe