Re: [PATCH v2] blk-mq: don't call ktime_get_ns() if we don't need it

2018-12-03 Thread Omar Sandoval
On Fri, Nov 30, 2018 at 02:13:54PM -0700, Jens Axboe wrote: > We only need the request fields and the end_io time if we have > stats enabled, or if we have a scheduler attached as those may > use it for completion time stats. Reviewed-by: Omar Sandoval > Signed-off-by: Jens Axboe > > --- > >

[PATCH v2] blk-mq: don't call ktime_get_ns() if we don't need it

2018-11-30 Thread Jens Axboe
We only need the request fields and the end_io time if we have stats enabled, or if we have a scheduler attached as those may use it for completion time stats. Signed-off-by: Jens Axboe --- v2: add helper, use it in both spots. also clear ->start_time_ns so merging doesn't read garbage.