From: Dave Date: Thu, 16 Jul 2015 20:56:00 +0000 (-0600) Subject: Re-seed random generator correctly between loops X-Git-Tag: fio-2.2.10~35 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=1520f26e713a2fded6728ad372af0d7b8c197adf Re-seed random generator correctly between loops re-seeding random generator in this way means that random patterns will precisely repeat between iterations. if rand_repeatable is set, this is desirable, otherwise it may produce unexpected IO patterns in random IO testing. Signed-off-by: Jens Axboe --- diff --git a/libfio.c b/libfio.c index 3a28f55e..30a3acb5 100644 --- a/libfio.c +++ b/libfio.c @@ -116,9 +116,10 @@ void clear_io_state(struct thread_data *td) } /* - * Set the same seed to get repeatable runs + * Re-Seed random number generator if rand_repeatable is true */ - td_fill_rand_seeds(td); + if (td->o.rand_repeatable) + td_fill_rand_seeds(td); } void reset_all_stats(struct thread_data *td)