Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: skip start/end time stamping for passthrough IO

commit 41fa722239b4 ("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: Kundan Kumar <kundan.kumar@samsung.com>
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Link: https://lore.kernel.org/r/20231222101707.6921-1-kundan.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Kundan Kumar and committed by
Jens Axboe
8e6e83d7 f70a4792

+6
+6
include/linux/blk-mq.h
··· 830 830 */ 831 831 static inline bool blk_mq_need_time_stamp(struct request *rq) 832 832 { 833 + /* 834 + * passthrough io doesn't use iostat accounting, cgroup stats 835 + * and io scheduler functionalities. 836 + */ 837 + if (blk_rq_is_passthrough(rq)) 838 + return false; 833 839 return (rq->rq_flags & (RQF_IO_STAT | RQF_STATS | RQF_USE_SCHED)); 834 840 } 835 841