Improve IOPs 50% by avoiding clock sampling when rate options not used
authorHorshack <horshack@live.com>
Mon, 6 Feb 2023 02:17:31 +0000 (21:17 -0500)
committerHorshack <horshack@live.com>
Mon, 6 Feb 2023 16:41:53 +0000 (11:41 -0500)
commit2f5102a53152c9e278b9dbaa58ad9cdb36673043
tree538ca132e695764c8e1dc69734fa13160b2f7bad
parentd72b10e3ca2f7e3b7ef4e54ea98e4e964a67192d
Improve IOPs 50% by avoiding clock sampling when rate options not used

Profiling revealed thread_main() is spending 50% of its time in calls to
utime_since_now() from rate_ddir(). This call is only necessary if the user
specified a rate option for the job. A conditional was added to avoid the call
if !should_check_rate(). See this link for details and profiling data:

https://github.com/axboe/fio/issues/1501#issuecomment-1418327049

Signed-off-by: Adam Horshack (horshack@live.com)
io_u.c