From: Jens Axboe Date: Wed, 9 Dec 2015 15:37:50 +0000 (-0700) Subject: Fix ramp time for io_submit_mode=offload X-Git-Tag: fio-2.2.13~11 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ada8f2350ff83c29b47720b7d2aebedef94e88f3;ds=sidebyside Fix ramp time for io_submit_mode=offload Signed-off-by: Jens Axboe --- diff --git a/time.c b/time.c index f1833c7b..b145e90e 100644 --- a/time.c +++ b/time.c @@ -80,6 +80,18 @@ int in_ramp_time(struct thread_data *td) return td->o.ramp_time && !td->ramp_time_over; } +static void parent_update_ramp(struct thread_data *td) +{ + struct thread_data *parent = td->parent; + + if (!parent || parent->ramp_time_over) + return; + + reset_all_stats(parent); + parent->ramp_time_over = 1; + td_set_runstate(parent, TD_RAMP); +} + int ramp_time_over(struct thread_data *td) { struct timeval tv; @@ -92,6 +104,7 @@ int ramp_time_over(struct thread_data *td) td->ramp_time_over = 1; reset_all_stats(td); td_set_runstate(td, TD_RAMP); + parent_update_ramp(td); return 1; }