On 12/21/23 4:12 AM, Kundan Kumar wrote: > This patch will avoid start/end time stamping for passthrough IO. > This helps to improve IO performance by ~7% This commit message needs to explain why we don't need to do timestamping for passthrough, rather than just say what the win is. > 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) I feel like this would be cleaner with a bit of separation: static inline bool blk_mq_need_time_stamp(struct request *rq) { /* comment on why passthrough is excempt */ if (blk_rq_is_passthrough(rq)) return false; return (rq->rq_flags & (RQF_IO_STAT | RQF_STATS | RQF_USE_SCHED)); } or something like that. -- Jens Axboe