X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=5630c9fb3e821708b6bb8552cd5a3111834c82fb;hp=6dc221ea4eb31ff95e8796d50aeaf4199845a429;hb=e916b390684ec1ca6247f98138fa9c1682701d29;hpb=079ad09b1ef22fa0d47c2cd2673908c5619aa41a diff --git a/init.c b/init.c index 6dc221ea..5630c9fb 100644 --- a/init.c +++ b/init.c @@ -90,6 +90,12 @@ static struct fio_option options[] = { .help = "Amount of IO buffers to keep in flight", .def = "1", }, + { + .name = "iodepth_low", + .type = FIO_OPT_INT, + .off1 = td_var_offset(iodepth_low), + .help = "Low water mark for queuing depth", + }, { .name = "size", .type = FIO_OPT_STR_VAL, @@ -644,6 +650,14 @@ static void fixup_options(struct thread_data *td) */ if (td->thinktime_spin > td->thinktime) td->thinktime_spin = td->thinktime; + + /* + * The low water mark cannot be bigger than the iodepth + */ + if (td->iodepth_low > td->iodepth || !td->iodepth_low) + td->iodepth_low = td->iodepth; + + printf("io depth %d/%d\n", td->iodepth_low, td->iodepth); } /*