This patch will avoid start/end time stamping for passthrough IO. This helps to improve IO performance by ~7% Signed-off-by: Kundan Kumar <kundan.kumar@xxxxxxxxxxx> Signed-off-by: Kanchan Joshi <joshi.k@xxxxxxxxxxx> --- include/linux/blk-mq.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 1ab3081c82ed..04617494db7e 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -830,7 +830,8 @@ void blk_mq_end_request_batch(struct io_comp_batch *ib); */ static inline bool blk_mq_need_time_stamp(struct request *rq) { - return (rq->rq_flags & (RQF_IO_STAT | RQF_STATS | RQF_USE_SCHED)); + return (rq->rq_flags & (RQF_IO_STAT | RQF_STATS | RQF_USE_SCHED) && + !blk_rq_is_passthrough(rq)); } static inline bool blk_mq_is_reserved_rq(struct request *rq) -- 2.25.1