X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=time.c;h=cd0e2a89144b59a565d88fab6192dda951a8ff2b;hb=cb765e413e4d124355c3eec47f7ac8cd314a6951;hp=c8876829a367ede755453f6b255b2f4139ee8a74;hpb=358ffaa6c37acb26e0f507934ba8a6f98f34ffee;p=fio.git diff --git a/time.c b/time.c index c8876829..cd0e2a89 100644 --- a/time.c +++ b/time.c @@ -57,6 +57,13 @@ uint64_t usec_sleep(struct thread_data *td, unsigned long usec) if (ts >= 1000000) { req.tv_sec = ts / 1000000; ts -= 1000000 * req.tv_sec; + /* + * Limit sleep to ~1 second at most, otherwise we + * don't notice then someone signaled the job to + * exit manually. + */ + if (req.tv_sec > 1) + req.tv_sec = 1; } else req.tv_sec = 0; @@ -118,6 +125,7 @@ bool ramp_time_over(struct thread_data *td) if (utime_since_now(&td->epoch) >= td->o.ramp_time) { td->ramp_time_over = true; reset_all_stats(td); + reset_io_stats(td); td_set_runstate(td, TD_RAMP); /*