.name = "I/O Flow",
.mask = FIO_OPT_G_IO_FLOW,
},
+ {
+ .name = "Description",
+ .mask = FIO_OPT_G_DESC,
+ },
+ {
+ .name = "Filename",
+ .mask = FIO_OPT_G_FILENAME,
+ },
+ {
+ .name = "General I/O",
+ .mask = FIO_OPT_G_IO_BASIC,
+ },
+ {
+ .name = "Cgroups",
+ .mask = FIO_OPT_G_CGROUP,
+ },
+ {
+ .name = "Runtime",
+ .mask = FIO_OPT_G_RUNTIME,
+ },
+ {
+ .name = "Process",
+ .mask = FIO_OPT_G_PROCESS,
+ },
+ {
+ .name = "Job credentials / priority",
+ .mask = FIO_OPT_G_CRED,
+ },
+ {
+ .name = "Clock settings",
+ .mask = FIO_OPT_G_CLOCK,
+ },
+ {
+ .name = "I/O Type",
+ .mask = FIO_OPT_G_IO_TYPE,
+ },
+ {
+ .name = "I/O Thinktime",
+ .mask = FIO_OPT_G_THINKTIME,
+ },
+ {
+ .name = "Randomizations",
+ .mask = FIO_OPT_G_RANDOM,
+ },
+ {
+ .name = "I/O buffers",
+ .mask = FIO_OPT_G_IO_BUF,
+ },
{
.name = NULL,
}
.off1 = td_var_offset(description),
.help = "Text job description",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_DESC,
},
{
.name = "name",
.off1 = td_var_offset(name),
.help = "Name of this job",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
- },
- {
- .name = "kb_base",
- .lname = "KB Base",
- .type = FIO_OPT_INT,
- .off1 = td_var_offset(kb_base),
- .verify = kb_base_verify,
- .prio = 1,
- .def = "1024",
- .help = "How many bytes per KB for reporting (1000 or 1024)",
- .category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_DESC,
},
{
.name = "filename",
.prio = -1, /* must come after "directory" */
.help = "File(s) to use for the workload",
.category = FIO_OPT_C_FILE,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_FILENAME,
},
{
.name = "directory",
.cb = str_directory_cb,
.help = "Directory to store files in",
.category = FIO_OPT_C_FILE,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_FILENAME,
},
{
.name = "lockfile",
.hide = 0,
.def = "none",
.category = FIO_OPT_C_FILE,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_FILENAME,
.posval = {
{ .ival = "none",
.oval = FILE_LOCK_NONE,
.cb = str_opendir_cb,
.help = "Recursively add files from this directory and down",
.category = FIO_OPT_C_FILE,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_FILENAME,
},
{
.name = "rw",
.def = "read",
.verify = rw_verify,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BASIC,
.posval = {
{ .ival = "read",
.oval = TD_DDIR_READ,
.help = "IO offset generator modifier",
.def = "sequential",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BASIC,
.posval = {
{ .ival = "sequential",
.oval = RW_SEQ_SEQ,
.help = "IO engine to use",
.def = FIO_PREFERRED_ENGINE,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BASIC,
.posval = {
{ .ival = "sync",
.help = "Use read/write",
.interval = 1,
.def = "1",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_IO_DEPTH,
+ .group = FIO_OPT_G_IO_BASIC,
},
{
.name = "iodepth_batch",
.interval = 1,
.def = "1",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_IO_DEPTH,
+ .group = FIO_OPT_G_IO_BASIC,
},
{
.name = "iodepth_batch_complete",
.interval = 1,
.def = "1",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_IO_DEPTH,
+ .group = FIO_OPT_G_IO_BASIC,
},
{
.name = "iodepth_low",
.hide = 1,
.interval = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_IO_DEPTH,
+ .group = FIO_OPT_G_IO_BASIC,
},
{
.name = "size",
.parent = "rw",
.hide = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RANDOM,
},
{
.name = "use_os_rand",
.parent = "rw",
.hide = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RANDOM,
},
{
.name = "norandommap",
.help = "Accept potential duplicate random blocks",
.parent = "rw",
.hide = 1,
+ .hide_on_set = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RANDOM,
},
{
.name = "softrandommap",
.hide = 1,
.def = "0",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RANDOM,
},
{
.name = "nrfiles",
.off1 = td_var_offset(odirect),
.help = "Use O_DIRECT IO (negates buffered)",
.def = "0",
+ .inverse = "buffered",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_TYPE,
},
{
.name = "buffered",
.neg = 1,
.help = "Use buffered IO (negates direct)",
.def = "1",
+ .inverse = "direct",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_TYPE,
},
{
.name = "overwrite",
.def = "1",
.interval = 1,
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RUNTIME,
},
{
.name = "numjobs",
.def = "1",
.interval = 1,
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RUNTIME,
},
{
.name = "startdelay",
.help = "Only start job when this period has passed",
.def = "0",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RUNTIME,
},
{
.name = "runtime",
.help = "Stop workload when this amount of time has passed",
.def = "0",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RUNTIME,
},
{
.name = "time_based",
.off1 = td_var_offset(time_based),
.help = "Keep running until runtime/timeout is met",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RUNTIME,
},
{
.name = "ramp_time",
.off1 = td_var_offset(ramp_time),
.help = "Ramp up time before measuring performance",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_RUNTIME,
},
{
.name = "clocksource",
.off1 = td_var_offset(clocksource),
.help = "What type of timing source to use",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CLOCK,
.posval = {
{ .ival = "gettimeofday",
.oval = CS_GTOD,
.cb = str_verify_cb,
.def = "0",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_VERIFY,
.posval = {
{ .ival = "0",
.oval = VERIFY_NONE,
.help = "Percentage of mixed workload that is reads",
.def = "50",
.interval = 5,
+ .inverse = "rwmixwrite",
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RWMIX,
},
.help = "Percentage of mixed workload that is writes",
.def = "50",
.interval = 5,
+ .inverse = "rwmixread",
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RWMIX,
},
.def = "0",
.interval = 1,
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CRED,
},
#ifdef FIO_HAVE_IOPRIO
{
.maxval = 7,
.interval = 1,
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CRED,
},
{
.name = "prioclass",
.maxval = 3,
.interval = 1,
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CRED,
},
#endif
{
.help = "Idle time between IO buffers (usec)",
.def = "0",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_THINKTIME,
},
{
.name = "thinktime_spin",
.parent = "thinktime",
.hide = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_THINKTIME,
},
{
.name = "thinktime_blocks",
.parent = "thinktime",
.hide = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_THINKTIME,
},
{
.name = "rate",
.help = "Invalidate buffer/page cache prior to running job",
.def = "1",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_TYPE,
},
{
.name = "sync",
.parent = "buffered",
.hide = 1,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
- },
- {
- .name = "bwavgtime",
- .lname = "Bandwidth average time",
- .type = FIO_OPT_INT,
- .off1 = td_var_offset(bw_avg_time),
- .help = "Time window over which to calculate bandwidth"
- " (msec)",
- .def = "500",
- .parent = "write_bw_log",
- .hide = 1,
- .interval = 100,
- .category = FIO_OPT_C_LOG,
- .group = FIO_OPT_G_INVALID,
- },
- {
- .name = "iopsavgtime",
- .lname = "IOPS average time",
- .type = FIO_OPT_INT,
- .off1 = td_var_offset(iops_avg_time),
- .help = "Time window over which to calculate IOPS (msec)",
- .def = "500",
- .parent = "write_iops_log",
- .hide = 1,
- .interval = 100,
- .category = FIO_OPT_C_LOG,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_TYPE,
},
{
.name = "create_serialize",
.category = FIO_OPT_C_FILE,
.group = FIO_OPT_G_INVALID,
},
- {
- .name = "cpuload",
- .lname = "CPU load",
- .type = FIO_OPT_INT,
- .off1 = td_var_offset(cpuload),
- .help = "Use this percentage of CPU",
- .category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
- },
- {
- .name = "cpuchunks",
- .lname = "CPU chunk",
- .type = FIO_OPT_INT,
- .off1 = td_var_offset(cpucycle),
- .help = "Length of the CPU burn cycles (usecs)",
- .def = "50000",
- .parent = "cpuload",
- .hide = 1,
- .category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
- },
#ifdef FIO_HAVE_CPU_AFFINITY
{
.name = "cpumask",
.cb = str_cpumask_cb,
.help = "CPU affinity mask",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CRED,
},
{
.name = "cpus_allowed",
.cb = str_cpus_allowed_cb,
.help = "Set CPUs allowed",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CRED,
},
#endif
{
.cb = str_exitall_cb,
.help = "Terminate all jobs when one exits",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_PROCESS,
},
{
.name = "stonewall",
.off1 = td_var_offset(stonewall),
.help = "Insert a hard barrier between this job and previous",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_PROCESS,
},
{
.name = "new_group",
.off1 = td_var_offset(new_group),
.help = "Mark the start of a new group (for reporting)",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_PROCESS,
},
{
.name = "thread",
.off1 = td_var_offset(use_thread),
.help = "Use threads instead of processes",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_PROCESS,
},
{
.name = "write_bw_log",
.group = FIO_OPT_G_INVALID,
},
{
- .name = "hugepage-size",
- .lname = "Hugepage size",
+ .name = "bwavgtime",
+ .lname = "Bandwidth average time",
.type = FIO_OPT_INT,
- .off1 = td_var_offset(hugepage_size),
- .help = "When using hugepages, specify size of each page",
- .def = __fio_stringify(FIO_HUGE_PAGE),
- .interval = 1024 * 1024,
- .category = FIO_OPT_C_GENERAL,
+ .off1 = td_var_offset(bw_avg_time),
+ .help = "Time window over which to calculate bandwidth"
+ " (msec)",
+ .def = "500",
+ .parent = "write_bw_log",
+ .hide = 1,
+ .interval = 100,
+ .category = FIO_OPT_C_LOG,
+ .group = FIO_OPT_G_INVALID,
+ },
+ {
+ .name = "iopsavgtime",
+ .lname = "IOPS average time",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(iops_avg_time),
+ .help = "Time window over which to calculate IOPS (msec)",
+ .def = "500",
+ .parent = "write_iops_log",
+ .hide = 1,
+ .interval = 100,
+ .category = FIO_OPT_C_LOG,
.group = FIO_OPT_G_INVALID,
},
{
.off1 = td_var_offset(group_reporting),
.help = "Do reporting on a per-group basis",
.def = "1",
- .category = FIO_OPT_C_GENERAL,
+ .category = FIO_OPT_C_STAT,
.group = FIO_OPT_G_INVALID,
},
{
.off1 = td_var_offset(zero_buffers),
.help = "Init IO buffers to all zeroes",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BUF,
},
{
.name = "refill_buffers",
.off1 = td_var_offset(refill_buffers),
.help = "Refill IO buffers on every IO submit",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BUF,
},
{
.name = "scramble_buffers",
.help = "Slightly scramble buffers on every IO submit",
.def = "1",
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BUF,
},
{
.name = "buffer_compress_percentage",
.help = "How compressible the buffer is (approximately)",
.interval = 5,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BUF,
},
{
.name = "buffer_compress_chunk",
.help = "Size of compressible region in buffer",
.interval = 256,
.category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_IO_BUF,
},
{
.name = "clat_percentiles",
.help = "Greatly reduce number of gettimeofday() calls",
.cb = str_gtod_reduce_cb,
.def = "0",
+ .hide_on_set = 1,
.category = FIO_OPT_C_STAT,
.group = FIO_OPT_G_INVALID,
},
.help = "Set up dedicated gettimeofday() thread on this CPU",
.verify = gtod_cpu_verify,
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CLOCK,
},
{
.name = "continue_on_error",
.off1 = td_var_offset(cgroup),
.help = "Add job to cgroup of this name",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CGROUP,
+ },
+ {
+ .name = "cgroup_nodelete",
+ .lname = "Cgroup no-delete",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(cgroup_nodelete),
+ .help = "Do not delete cgroups after job completion",
+ .def = "0",
+ .parent = "cgroup",
+ .category = FIO_OPT_C_GENERAL,
+ .group = FIO_OPT_G_CGROUP,
},
{
.name = "cgroup_weight",
.help = "Use given weight for cgroup",
.minval = 100,
.maxval = 1000,
+ .parent = "cgroup",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
- },
- {
- .name = "cgroup_nodelete",
- .lname = "Cgroup no-delete",
- .type = FIO_OPT_BOOL,
- .off1 = td_var_offset(cgroup_nodelete),
- .help = "Do not delete cgroups after job completion",
- .def = "0",
- .category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CGROUP,
},
{
.name = "uid",
.off1 = td_var_offset(uid),
.help = "Run job with this user ID",
.category = FIO_OPT_C_GENERAL,
- .group = FIO_OPT_G_INVALID,
+ .group = FIO_OPT_G_CRED,
},
{
.name = "gid",
.off1 = td_var_offset(gid),
.help = "Run job with this group ID",
.category = FIO_OPT_C_GENERAL,
+ .group = FIO_OPT_G_CRED,
+ },
+ {
+ .name = "kb_base",
+ .lname = "KB Base",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(kb_base),
+ .verify = kb_base_verify,
+ .prio = 1,
+ .def = "1024",
+ .help = "How many bytes per KB for reporting (1000 or 1024)",
+ .category = FIO_OPT_C_GENERAL,
+ .group = FIO_OPT_G_INVALID,
+ },
+ {
+ .name = "hugepage-size",
+ .lname = "Hugepage size",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(hugepage_size),
+ .help = "When using hugepages, specify size of each page",
+ .def = __fio_stringify(FIO_HUGE_PAGE),
+ .interval = 1024 * 1024,
+ .category = FIO_OPT_C_GENERAL,
.group = FIO_OPT_G_INVALID,
},
{
td->eo = NULL;
}
}
+
+struct fio_option *fio_option_find(const char *name)
+{
+ return find_option(fio_options, name);
+}
+