Commit 8e6e83d7 authored by Kundan Kumar's avatar Kundan Kumar Committed by Jens Axboe

block: skip start/end time stamping for passthrough IO

commit 41fa7222 ("blk-mq: do not include passthrough requests in I/O
accounting")' disables I/O accounting for passthrough requests. Since tools
like 'iostat' do not show anything useful for passthrough I/O, it's
wasteful to do start/end time-stamping. So do away with that.

Avoiding the time-stamping improves the I/O performance by ~7%
Signed-off-by: default avatarKundan Kumar <kundan.kumar@samsung.com>
Signed-off-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Link: https://lore.kernel.org/r/20231222101707.6921-1-kundan.kumar@samsung.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f70a4792
......@@ -830,6 +830,12 @@ void blk_mq_end_request_batch(struct io_comp_batch *ib);
*/
static inline bool blk_mq_need_time_stamp(struct request *rq)
{
/*
* passthrough io doesn't use iostat accounting, cgroup stats
* and io scheduler functionalities.
*/
if (blk_rq_is_passthrough(rq))
return false;
return (rq->rq_flags & (RQF_IO_STAT | RQF_STATS | RQF_USE_SCHED));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment