From: Vincent Fu Date: Tue, 20 Jun 2023 18:11:36 +0000 (-0400) Subject: init: don't adjust time units again for subjobs X-Git-Tag: fio-3.36~77 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5087502fb05b2b4d756045c594a2e09c2ffc97dc;p=fio.git init: don't adjust time units again for subjobs We adjust max_latency and latency_target values to be nsec internally. Make sure we do this only once for the parent job and don't do it a second time for a subjob. Fixes: https://github.com/axboe/fio/issues/1582 Signed-off-by: Vincent Fu --- diff --git a/init.c b/init.c index 437406ec..10e63cca 100644 --- a/init.c +++ b/init.c @@ -951,13 +951,16 @@ static int fixup_options(struct thread_data *td) if (o->disable_slat) o->slat_percentiles = 0; - /* - * Fix these up to be nsec internally - */ - for_each_rw_ddir(ddir) - o->max_latency[ddir] *= 1000ULL; + /* Do this only for the parent job */ + if (!td->subjob_number) { + /* + * Fix these up to be nsec internally + */ + for_each_rw_ddir(ddir) + o->max_latency[ddir] *= 1000ULL; - o->latency_target *= 1000ULL; + o->latency_target *= 1000ULL; + } /* * Dedupe working set verifications