add example using --rate_poisson
[fio.git] / options.c
index fab467533c607d365e559f8ede8d93afb5b0d824..ac41565c8677783aaa222ccf15929a74c1b7b39a 100644 (file)
--- a/options.c
+++ b/options.c
@@ -351,7 +351,8 @@ static int str_mem_cb(void *data, const char *mem)
 {
        struct thread_data *td = data;
 
-       if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
+       if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP ||
+           td->o.mem_type == MEM_MMAPSHARED)
                td->o.mmapfile = get_opt_postfix(mem);
 
        return 0;
@@ -958,7 +959,7 @@ static int str_verify_pattern_cb(void *data, const char *input)
        assert(ret != 0);
        td->o.verify_pattern_bytes = ret;
        /*
-        * VERIFY_META could already be set
+        * VERIFY_* could already be set
         */
        if (!fio_option_is_set(&td->o, verify))
                td->o.verify = VERIFY_PATTERN;
@@ -1504,11 +1505,12 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .group  = FIO_OPT_G_IO_BASIC,
        },
        {
-               .name   = "iodepth_batch_complete",
-               .lname  = "IO Depth batch complete",
+               .name   = "iodepth_batch_complete_min",
+               .lname  = "Min IO depth batch complete",
+               .alias  = "iodepth_batch_complete",
                .type   = FIO_OPT_INT,
-               .off1   = td_var_offset(iodepth_batch_complete),
-               .help   = "Number of IO buffers to retrieve in one go",
+               .off1   = td_var_offset(iodepth_batch_complete_min),
+               .help   = "Min number of IO buffers to retrieve in one go",
                .parent = "iodepth",
                .hide   = 1,
                .minval = 0,
@@ -1517,6 +1519,19 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_IO_BASIC,
        },
+       {
+               .name   = "iodepth_batch_complete_max",
+               .lname  = "Max IO depth batch complete",
+               .type   = FIO_OPT_INT,
+               .off1   = td_var_offset(iodepth_batch_complete_max),
+               .help   = "Max number of IO buffers to retrieve in one go",
+               .parent = "iodepth",
+               .hide   = 1,
+               .minval = 0,
+               .interval = 1,
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_IO_BASIC,
+       },
        {
                .name   = "iodepth_low",
                .lname  = "IO Depth batch low",
@@ -2214,6 +2229,10 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                            .oval = MEM_MMAP,
                            .help = "Use mmap(2) (file or anon) for IO buffers",
                          },
+                         { .ival = "mmapshared",
+                           .oval = MEM_MMAPSHARED,
+                           .help = "Like mmap, but use the shared flag",
+                         },
 #ifdef FIO_HAVE_HUGETLB
                          { .ival = "mmaphuge",
                            .oval = MEM_MMAPHUGE,
@@ -2294,9 +2313,13 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                            .oval = VERIFY_XXHASH,
                            .help = "Use xxhash checksums for verification",
                          },
+                         /* Meta information was included into verify_header,
+                          * 'meta' verification is implied by default. */
                          { .ival = "meta",
-                           .oval = VERIFY_META,
-                           .help = "Use io information",
+                           .oval = VERIFY_HDR_ONLY,
+                           .help = "Use io information for verification. "
+                                   "Now is implied by default, thus option is obsolete, "
+                                   "don't use it",
                          },
                          { .ival = "pattern",
                            .oval = VERIFY_PATTERN_NO_HDR,
@@ -2832,6 +2855,18 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_RATE,
        },
+       {
+               .name   = "rate_poisson",
+               .lname  = "simulate requests under Poisson process",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(poisson_rate),
+               .help   = "With rate limit, simulate requests that follow Poisson process",
+               .def    = "0",
+               .parent = "rate",
+               .hide   = 1,
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_RATE,
+       },
        {
                .name   = "ratecycle",
                .lname  = "I/O rate cycle",
@@ -3173,7 +3208,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .type   = FIO_OPT_INT,
                .off1   = td_var_offset(log_gz),
                .help   = "Log in compressed chunks of this size",
-               .minval = 32 * 1024 * 1024ULL,
+               .minval = 1024ULL,
                .maxval = 512 * 1024 * 1024ULL,
                .category = FIO_OPT_C_LOG,
                .group  = FIO_OPT_G_INVALID,