X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=744ae854c4f4cbcb5e1f281472b7a1719e073280;hp=9e41d55af957a66d6a0900462d5d4ca5a8c7f038;hb=65db0851e8cd98c61e029e64db7038f92ad9ae02;hpb=890df538b3645d9310a3527513195773130d1d7f diff --git a/init.c b/init.c index 9e41d55a..744ae854 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) { @@ -882,6 +895,8 @@ static int is_empty_or_comment(char *line) for (i = 0; i < strlen(line); i++) { if (line[i] == ';') return 1; + if (line[i] == '#') + return 1; if (!isspace(line[i]) && !iscntrl(line[i])) return 0; }