X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=9e7fb2c055e62a17ceac9dbf78757d1b83bd357c;hp=9e41d55af957a66d6a0900462d5d4ca5a8c7f038;hb=c1324df14320c37fbe0f08e3b9f9a9af00e23ec4;hpb=890df538b3645d9310a3527513195773130d1d7f diff --git a/init.c b/init.c index 9e41d55a..9e7fb2c0 100644 --- a/init.c +++ b/init.c @@ -330,6 +330,13 @@ static struct fio_option options[] = { .help = "Idle time between IO buffers (usec)", .def = "0", }, + { + .name = "thinktime_spin", + .type = FIO_OPT_INT, + .off1 = td_var_offset(thinktime_spin), + .help = "Start thinktime by spinning this amount (usec)", + .def = "0", + }, { .name = "thinktime_blocks", .type = FIO_OPT_INT, @@ -631,6 +638,12 @@ static void fixup_options(struct thread_data *td) */ if (td->filetype == FIO_TYPE_CHAR && td->odirect) td->odirect = 0; + + /* + * thinktime_spin must be less than thinktime + */ + if (td->thinktime_spin > td->thinktime) + td->thinktime_spin = td->thinktime; } /* @@ -845,7 +858,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) {