From 2f073b09812255edca0f5854d36720418db88912 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 17 Feb 2007 02:09:01 +0100 Subject: [PATCH] [PATCH] Fix random seed for numjobs > 1 If you had numjobs larger than 1, then each shared job would get the same random seed, resulting in the exact same io pattern. Multiply the seed with the thread number, that will still get repeatable patterns but only per-thread/process. Signed-off-by: Jens Axboe --- init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.c b/init.c index 9e41d55a..1dec2bbd 100644 --- a/init.c +++ b/init.c @@ -845,7 +845,7 @@ int init_random_state(struct thread_data *td) return 0; if (td->rand_repeatable) - seeds[3] = FIO_RANDSEED; + seeds[3] = FIO_RANDSEED * td->thread_number; if (!td->norandommap) { for_each_file(td, f, i) { -- 2.25.1