Re: [PATCH] block: skip start/end time stamping for passthrough IO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux