X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=9e7fb2c055e62a17ceac9dbf78757d1b83bd357c;hp=1dec2bbd324209acf04b72e1430c4d1d5d9db2cb;hb=c1324df14320c37fbe0f08e3b9f9a9af00e23ec4;hpb=2f073b09812255edca0f5854d36720418db88912 diff --git a/init.c b/init.c index 1dec2bbd..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; } /*