add example using --rate_poisson
[fio.git] / options.c
index 0169ca2974329bda89c1444246ddfebade1ac462..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;
@@ -2228,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,
@@ -2850,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",