18 #include "crc/crc32c.h"
21 * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that.
23 static char *get_opt_postfix(const char *str)
25 char *p = strstr(str, ":");
31 strip_blank_front(&p);
36 static int converthexchartoint(char a)
56 static int bs_cmp(const void *p1, const void *p2)
58 const struct bssplit *bsp1 = p1;
59 const struct bssplit *bsp2 = p2;
61 return bsp1->perc < bsp2->perc;
64 static int bssplit_ddir(struct thread_options *o, int ddir, char *str)
66 struct bssplit *bssplit;
67 unsigned int i, perc, perc_missing;
68 unsigned int max_bs, min_bs;
72 o->bssplit_nr[ddir] = 4;
73 bssplit = malloc(4 * sizeof(struct bssplit));
78 while ((fname = strsep(&str, ":")) != NULL) {
85 * grow struct buffer, if needed
87 if (i == o->bssplit_nr[ddir]) {
88 o->bssplit_nr[ddir] <<= 1;
89 bssplit = realloc(bssplit, o->bssplit_nr[ddir]
90 * sizeof(struct bssplit));
93 perc_str = strstr(fname, "/");
97 perc = atoi(perc_str);
105 if (str_to_decimal(fname, &val, 1, o, 0)) {
106 log_err("fio: bssplit conversion failed\n");
117 bssplit[i].perc = perc;
121 o->bssplit_nr[ddir] = i;
124 * Now check if the percentages add up, and how much is missing
126 perc = perc_missing = 0;
127 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
128 struct bssplit *bsp = &bssplit[i];
130 if (bsp->perc == (unsigned char) -1)
137 log_err("fio: bssplit percentages add to more than 100%%\n");
142 * If values didn't have a percentage set, divide the remains between
146 for (i = 0; i < o->bssplit_nr[ddir]; i++) {
147 struct bssplit *bsp = &bssplit[i];
149 if (bsp->perc == (unsigned char) -1)
150 bsp->perc = (100 - perc) / perc_missing;
154 o->min_bs[ddir] = min_bs;
155 o->max_bs[ddir] = max_bs;
158 * now sort based on percentages, for ease of lookup
160 qsort(bssplit, o->bssplit_nr[ddir], sizeof(struct bssplit), bs_cmp);
161 o->bssplit[ddir] = bssplit;
165 static int str_bssplit_cb(void *data, const char *input)
167 struct thread_data *td = data;
168 char *str, *p, *odir, *ddir;
174 p = str = strdup(input);
176 strip_blank_front(&str);
177 strip_blank_end(str);
179 odir = strchr(str, ',');
181 ddir = strchr(odir + 1, ',');
183 ret = bssplit_ddir(&td->o, DDIR_TRIM, ddir + 1);
189 op = strdup(odir + 1);
190 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
195 ret = bssplit_ddir(&td->o, DDIR_WRITE, odir + 1);
198 ret = bssplit_ddir(&td->o, DDIR_READ, str);
204 ret = bssplit_ddir(&td->o, DDIR_WRITE, op);
209 ret = bssplit_ddir(&td->o, DDIR_TRIM, op);
212 ret = bssplit_ddir(&td->o, DDIR_READ, str);
219 static int str2error(char *str)
221 const char *err[] = { "EPERM", "ENOENT", "ESRCH", "EINTR", "EIO",
222 "ENXIO", "E2BIG", "ENOEXEC", "EBADF",
223 "ECHILD", "EAGAIN", "ENOMEM", "EACCES",
224 "EFAULT", "ENOTBLK", "EBUSY", "EEXIST",
225 "EXDEV", "ENODEV", "ENOTDIR", "EISDIR",
226 "EINVAL", "ENFILE", "EMFILE", "ENOTTY",
227 "ETXTBSY","EFBIG", "ENOSPC", "ESPIPE",
228 "EROFS","EMLINK", "EPIPE", "EDOM", "ERANGE" };
229 int i = 0, num = sizeof(err) / sizeof(void *);
232 if (!strcmp(err[i], str))
239 static int ignore_error_type(struct thread_data *td, int etype, char *str)
245 if (etype >= ERROR_TYPE_CNT) {
246 log_err("Illegal error type\n");
250 td->o.ignore_error_nr[etype] = 4;
251 error = malloc(4 * sizeof(struct bssplit));
254 while ((fname = strsep(&str, ":")) != NULL) {
260 * grow struct buffer, if needed
262 if (i == td->o.ignore_error_nr[etype]) {
263 td->o.ignore_error_nr[etype] <<= 1;
264 error = realloc(error, td->o.ignore_error_nr[etype]
267 if (fname[0] == 'E') {
268 error[i] = str2error(fname);
270 error[i] = atoi(fname);
272 error[i] = -error[i];
275 log_err("Unknown error %s, please use number value \n",
283 td->o.continue_on_error |= 1 << etype;
284 td->o.ignore_error_nr[etype] = i;
285 td->o.ignore_error[etype] = error;
293 static int str_ignore_error_cb(void *data, const char *input)
295 struct thread_data *td = data;
297 int type = 0, ret = 1;
302 p = str = strdup(input);
304 strip_blank_front(&str);
305 strip_blank_end(str);
311 ret = ignore_error_type(td, type, p);
321 static int str_rw_cb(void *data, const char *str)
323 struct thread_data *td = data;
324 struct thread_options *o = &td->o;
333 nr = get_opt_postfix(str);
338 o->ddir_seq_nr = atoi(nr);
342 if (str_to_decimal(nr, &val, 1, o, 0)) {
343 log_err("fio: rw postfix parsing failed\n");
348 o->ddir_seq_add = val;
355 static int str_mem_cb(void *data, const char *mem)
357 struct thread_data *td = data;
359 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP)
360 td->o.mmapfile = get_opt_postfix(mem);
365 static int fio_clock_source_cb(void *data, const char *str)
367 struct thread_data *td = data;
369 fio_clock_source = td->o.clocksource;
370 fio_clock_source_set = 1;
375 static int str_rwmix_read_cb(void *data, unsigned long long *val)
377 struct thread_data *td = data;
379 td->o.rwmix[DDIR_READ] = *val;
380 td->o.rwmix[DDIR_WRITE] = 100 - *val;
384 static int str_rwmix_write_cb(void *data, unsigned long long *val)
386 struct thread_data *td = data;
388 td->o.rwmix[DDIR_WRITE] = *val;
389 td->o.rwmix[DDIR_READ] = 100 - *val;
393 static int str_exitall_cb(void)
395 exitall_on_terminate = 1;
399 #ifdef FIO_HAVE_CPU_AFFINITY
400 int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index)
402 unsigned int i, index, cpus_in_mask;
403 const long max_cpu = cpus_online();
405 cpus_in_mask = fio_cpu_count(mask);
406 cpu_index = cpu_index % cpus_in_mask;
409 for (i = 0; i < max_cpu; i++) {
410 if (!fio_cpu_isset(mask, i))
413 if (cpu_index != index)
414 fio_cpu_clear(mask, i);
419 return fio_cpu_count(mask);
422 static int str_cpumask_cb(void *data, unsigned long long *val)
424 struct thread_data *td = data;
432 ret = fio_cpuset_init(&td->o.cpumask);
434 log_err("fio: cpuset_init failed\n");
435 td_verror(td, ret, "fio_cpuset_init");
439 max_cpu = cpus_online();
441 for (i = 0; i < sizeof(int) * 8; i++) {
442 if ((1 << i) & *val) {
444 log_err("fio: CPU %d too large (max=%ld)\n", i,
448 dprint(FD_PARSE, "set cpu allowed %d\n", i);
449 fio_cpu_set(&td->o.cpumask, i);
453 td->o.cpumask_set = 1;
457 static int set_cpus_allowed(struct thread_data *td, os_cpu_mask_t *mask,
464 ret = fio_cpuset_init(mask);
466 log_err("fio: cpuset_init failed\n");
467 td_verror(td, ret, "fio_cpuset_init");
471 p = str = strdup(input);
473 strip_blank_front(&str);
474 strip_blank_end(str);
476 max_cpu = cpus_online();
478 while ((cpu = strsep(&str, ",")) != NULL) {
487 while ((cpu2 = strsep(&str2, "-")) != NULL) {
497 while (icpu <= icpu2) {
498 if (icpu >= FIO_MAX_CPUS) {
499 log_err("fio: your OS only supports up to"
500 " %d CPUs\n", (int) FIO_MAX_CPUS);
504 if (icpu > max_cpu) {
505 log_err("fio: CPU %d too large (max=%ld)\n",
511 dprint(FD_PARSE, "set cpu allowed %d\n", icpu);
512 fio_cpu_set(mask, icpu);
521 td->o.cpumask_set = 1;
525 static int str_cpus_allowed_cb(void *data, const char *input)
527 struct thread_data *td = data;
533 ret = set_cpus_allowed(td, &td->o.cpumask, input);
535 td->o.cpumask_set = 1;
540 static int str_verify_cpus_allowed_cb(void *data, const char *input)
542 struct thread_data *td = data;
545 ret = set_cpus_allowed(td, &td->o.verify_cpumask, input);
547 td->o.verify_cpumask_set = 1;
553 #ifdef CONFIG_LIBNUMA
554 static int str_numa_cpunodes_cb(void *data, char *input)
556 struct thread_data *td = data;
557 struct bitmask *verify_bitmask;
562 /* numa_parse_nodestring() parses a character string list
563 * of nodes into a bit mask. The bit mask is allocated by
564 * numa_allocate_nodemask(), so it should be freed by
565 * numa_free_nodemask().
567 verify_bitmask = numa_parse_nodestring(input);
568 if (verify_bitmask == NULL) {
569 log_err("fio: numa_parse_nodestring failed\n");
570 td_verror(td, 1, "str_numa_cpunodes_cb");
573 numa_free_nodemask(verify_bitmask);
575 td->o.numa_cpunodes = strdup(input);
576 td->o.numa_cpumask_set = 1;
580 static int str_numa_mpol_cb(void *data, char *input)
582 struct thread_data *td = data;
583 const char * const policy_types[] =
584 { "default", "prefer", "bind", "interleave", "local", NULL };
587 struct bitmask *verify_bitmask;
592 nodelist = strchr(input, ':');
594 /* NUL-terminate mode */
598 for (i = 0; i <= MPOL_LOCAL; i++) {
599 if (!strcmp(input, policy_types[i])) {
600 td->o.numa_mem_mode = i;
604 if (i > MPOL_LOCAL) {
605 log_err("fio: memory policy should be: default, prefer, bind, interleave, local\n");
609 switch (td->o.numa_mem_mode) {
612 * Insist on a nodelist of one node only
615 char *rest = nodelist;
616 while (isdigit(*rest))
619 log_err("fio: one node only for \'prefer\'\n");
623 log_err("fio: one node is needed for \'prefer\'\n");
627 case MPOL_INTERLEAVE:
629 * Default to online nodes with memory if no nodelist
632 nodelist = strdup("all");
637 * Don't allow a nodelist
640 log_err("fio: NO nodelist for \'local\'\n");
646 * Insist on a nodelist
649 log_err("fio: a nodelist is needed for \'bind\'\n");
656 /* numa_parse_nodestring() parses a character string list
657 * of nodes into a bit mask. The bit mask is allocated by
658 * numa_allocate_nodemask(), so it should be freed by
659 * numa_free_nodemask().
661 switch (td->o.numa_mem_mode) {
663 td->o.numa_mem_prefer_node = atoi(nodelist);
665 case MPOL_INTERLEAVE:
667 verify_bitmask = numa_parse_nodestring(nodelist);
668 if (verify_bitmask == NULL) {
669 log_err("fio: numa_parse_nodestring failed\n");
670 td_verror(td, 1, "str_numa_memnodes_cb");
673 td->o.numa_memnodes = strdup(nodelist);
674 numa_free_nodemask(verify_bitmask);
683 td->o.numa_memmask_set = 1;
691 static int str_fst_cb(void *data, const char *str)
693 struct thread_data *td = data;
694 char *nr = get_opt_postfix(str);
696 td->file_service_nr = 1;
698 td->file_service_nr = atoi(nr);
705 #ifdef CONFIG_SYNC_FILE_RANGE
706 static int str_sfr_cb(void *data, const char *str)
708 struct thread_data *td = data;
709 char *nr = get_opt_postfix(str);
711 td->sync_file_range_nr = 1;
713 td->sync_file_range_nr = atoi(nr);
721 static int str_random_distribution_cb(void *data, const char *str)
723 struct thread_data *td = data;
730 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
732 else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
737 nr = get_opt_postfix(str);
738 if (nr && !str_to_float(nr, &val)) {
739 log_err("fio: random postfix parsing failed\n");
746 if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
748 log_err("fio: zipf theta must different than 1.0\n");
751 td->o.zipf_theta.u.f = val;
753 if (val <= 0.00 || val >= 1.00) {
754 log_err("fio: pareto input out of range (0 < input < 1.0)\n");
757 td->o.pareto_h.u.f = val;
764 * Return next name in the string. Files are separated with ':'. If the ':'
765 * is escaped with a '\', then that ':' is part of the filename and does not
766 * indicate a new file.
768 static char *get_next_name(char **ptr)
773 if (!str || !strlen(str))
779 * No colon, we are done
781 p = strchr(str, ':');
788 * We got a colon, but it's the first character. Skip and
796 if (*(p - 1) != '\\') {
802 memmove(p - 1, p, strlen(p) + 1);
810 static int get_max_name_idx(char *input)
812 unsigned int cur_idx;
815 p = str = strdup(input);
816 for (cur_idx = 0; ; cur_idx++)
817 if (get_next_name(&str) == NULL)
825 * Returns the directory at the index, indexes > entires will be
826 * assigned via modulo division of the index
828 int set_name_idx(char *target, char *input, int index)
830 unsigned int cur_idx;
832 char *fname, *str, *p;
834 p = str = strdup(input);
836 index %= get_max_name_idx(input);
837 for (cur_idx = 0; cur_idx <= index; cur_idx++)
838 fname = get_next_name(&str);
840 len = sprintf(target, "%s/", fname);
846 static int str_filename_cb(void *data, const char *input)
848 struct thread_data *td = data;
849 char *fname, *str, *p;
851 p = str = strdup(input);
853 strip_blank_front(&str);
854 strip_blank_end(str);
856 if (!td->files_index)
859 while ((fname = get_next_name(&str)) != NULL) {
862 add_file(td, fname, 0, 1);
869 static int str_directory_cb(void *data, const char fio_unused *unused)
871 struct thread_data *td = data;
873 char *dirname, *str, *p;
879 p = str = strdup(td->o.directory);
880 while ((dirname = get_next_name(&str)) != NULL) {
881 if (lstat(dirname, &sb) < 0) {
884 log_err("fio: %s is not a directory\n", dirname);
885 td_verror(td, ret, "lstat");
888 if (!S_ISDIR(sb.st_mode)) {
889 log_err("fio: %s is not a directory\n", dirname);
900 static int str_lockfile_cb(void *data, const char fio_unused *str)
902 struct thread_data *td = data;
904 if (td->files_index) {
905 log_err("fio: lockfile= option must precede filename=\n");
912 static int str_opendir_cb(void *data, const char fio_unused *str)
914 struct thread_data *td = data;
919 if (!td->files_index)
922 return add_dir_files(td, td->o.opendir);
925 static int pattern_cb(char *pattern, unsigned int max_size,
926 const char *input, unsigned int *pattern_bytes)
929 int i = 0, j = 0, len, k, base = 10;
930 uint32_t pattern_length;
934 * Check if it's a string input
936 loc1 = strchr(input, '\"');
940 if (*loc1 == '\0' || *loc1 == '\"')
945 } while (i < max_size);
954 * No string, find out if it's decimal or hexidecimal
956 loc1 = strstr(input, "0x");
957 loc2 = strstr(input, "0X");
960 off = strtol(input, NULL, base);
961 if (off != LONG_MAX || errno != ERANGE) {
963 pattern[i] = off & 0xff;
972 j = loc1 - input + 2;
974 j = loc2 - input + 2;
977 if (len - j < max_size * 2) {
979 off = converthexchartoint(input[k--]);
981 off += (converthexchartoint(input[k--])
983 pattern[i++] = (char) off;
989 * Fill the pattern all the way to the end. This greatly reduces
990 * the number of memcpy's we have to do when verifying the IO.
994 while (i > 1 && i * 2 <= max_size) {
995 memcpy(&pattern[i], &pattern[0], i);
1000 * Fill remainder, if the pattern multiple ends up not being
1003 while (i > 1 && i < max_size) {
1004 unsigned int b = min(pattern_length, max_size - i);
1006 memcpy(&pattern[i], &pattern[0], b);
1012 * The code in verify_io_u_pattern assumes a single byte
1013 * pattern fills the whole verify pattern buffer.
1015 memset(pattern, pattern[0], max_size);
1022 static int str_buffer_pattern_cb(void *data, const char *input)
1024 struct thread_data *td = data;
1027 ret = pattern_cb(td->o.buffer_pattern, MAX_PATTERN_SIZE, input,
1028 &td->o.buffer_pattern_bytes);
1030 if (!ret && td->o.buffer_pattern_bytes) {
1031 td->o.refill_buffers = 0;
1032 td->o.scramble_buffers = 0;
1033 td->o.zero_buffers = 0;
1035 log_err("fio: failed parsing pattern `%s`\n", input);
1042 static int str_buffer_compress_cb(void *data, unsigned long long *il)
1044 struct thread_data *td = data;
1046 td->flags |= TD_F_COMPRESS;
1047 td->o.compress_percentage = *il;
1051 static int str_verify_pattern_cb(void *data, const char *input)
1053 struct thread_data *td = data;
1056 ret = pattern_cb(td->o.verify_pattern, MAX_PATTERN_SIZE, input,
1057 &td->o.verify_pattern_bytes);
1060 * VERIFY_META could already be set
1062 if (!ret && td->o.verify == VERIFY_NONE)
1063 td->o.verify = VERIFY_PATTERN;
1068 static int str_gtod_reduce_cb(void *data, int *il)
1070 struct thread_data *td = data;
1073 td->o.disable_lat = !!val;
1074 td->o.disable_clat = !!val;
1075 td->o.disable_slat = !!val;
1076 td->o.disable_bw = !!val;
1077 td->o.clat_percentiles = !val;
1079 td->tv_cache_mask = 63;
1084 static int str_gtod_cpu_cb(void *data, long long *il)
1086 struct thread_data *td = data;
1089 td->o.gtod_cpu = val;
1090 td->o.gtod_offload = 1;
1094 static int str_size_cb(void *data, unsigned long long *__val)
1096 struct thread_data *td = data;
1097 unsigned long long v = *__val;
1099 if (parse_is_percent(v)) {
1101 td->o.size_percent = -1ULL - v;
1108 static int rw_verify(struct fio_option *o, void *data)
1110 struct thread_data *td = data;
1112 if (read_only && td_write(td)) {
1113 log_err("fio: job <%s> has write bit set, but fio is in"
1114 " read-only mode\n", td->o.name);
1121 static int gtod_cpu_verify(struct fio_option *o, void *data)
1123 #ifndef FIO_HAVE_CPU_AFFINITY
1124 struct thread_data *td = data;
1126 if (td->o.gtod_cpu) {
1127 log_err("fio: platform must support CPU affinity for"
1128 "gettimeofday() offloading\n");
1139 static struct opt_group fio_opt_groups[] = {
1142 .mask = FIO_OPT_C_GENERAL,
1146 .mask = FIO_OPT_C_IO,
1150 .mask = FIO_OPT_C_FILE,
1153 .name = "Statistics",
1154 .mask = FIO_OPT_C_STAT,
1158 .mask = FIO_OPT_C_LOG,
1162 .mask = FIO_OPT_C_PROFILE,
1169 static struct opt_group *__opt_group_from_mask(struct opt_group *ogs, unsigned int *mask,
1170 unsigned int inv_mask)
1172 struct opt_group *og;
1175 if (*mask == inv_mask || !*mask)
1178 for (i = 0; ogs[i].name; i++) {
1181 if (*mask & og->mask) {
1182 *mask &= ~(og->mask);
1190 struct opt_group *opt_group_from_mask(unsigned int *mask)
1192 return __opt_group_from_mask(fio_opt_groups, mask, FIO_OPT_C_INVALID);
1195 static struct opt_group fio_opt_cat_groups[] = {
1197 .name = "Latency profiling",
1198 .mask = FIO_OPT_G_LATPROF,
1202 .mask = FIO_OPT_G_RATE,
1206 .mask = FIO_OPT_G_ZONE,
1209 .name = "Read/write mix",
1210 .mask = FIO_OPT_G_RWMIX,
1214 .mask = FIO_OPT_G_VERIFY,
1218 .mask = FIO_OPT_G_TRIM,
1221 .name = "I/O Logging",
1222 .mask = FIO_OPT_G_IOLOG,
1225 .name = "I/O Depth",
1226 .mask = FIO_OPT_G_IO_DEPTH,
1230 .mask = FIO_OPT_G_IO_FLOW,
1233 .name = "Description",
1234 .mask = FIO_OPT_G_DESC,
1238 .mask = FIO_OPT_G_FILENAME,
1241 .name = "General I/O",
1242 .mask = FIO_OPT_G_IO_BASIC,
1246 .mask = FIO_OPT_G_CGROUP,
1250 .mask = FIO_OPT_G_RUNTIME,
1254 .mask = FIO_OPT_G_PROCESS,
1257 .name = "Job credentials / priority",
1258 .mask = FIO_OPT_G_CRED,
1261 .name = "Clock settings",
1262 .mask = FIO_OPT_G_CLOCK,
1266 .mask = FIO_OPT_G_IO_TYPE,
1269 .name = "I/O Thinktime",
1270 .mask = FIO_OPT_G_THINKTIME,
1273 .name = "Randomizations",
1274 .mask = FIO_OPT_G_RANDOM,
1277 .name = "I/O buffers",
1278 .mask = FIO_OPT_G_IO_BUF,
1281 .name = "Tiobench profile",
1282 .mask = FIO_OPT_G_TIOBENCH,
1290 struct opt_group *opt_group_cat_from_mask(unsigned int *mask)
1292 return __opt_group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
1296 * Map of job/command line options
1298 struct fio_option fio_options[FIO_MAX_OPTS] = {
1300 .name = "description",
1301 .lname = "Description of job",
1302 .type = FIO_OPT_STR_STORE,
1303 .off1 = td_var_offset(description),
1304 .help = "Text job description",
1305 .category = FIO_OPT_C_GENERAL,
1306 .group = FIO_OPT_G_DESC,
1310 .lname = "Job name",
1311 .type = FIO_OPT_STR_STORE,
1312 .off1 = td_var_offset(name),
1313 .help = "Name of this job",
1314 .category = FIO_OPT_C_GENERAL,
1315 .group = FIO_OPT_G_DESC,
1319 .lname = "Filename(s)",
1320 .type = FIO_OPT_STR_STORE,
1321 .off1 = td_var_offset(filename),
1322 .cb = str_filename_cb,
1323 .prio = -1, /* must come after "directory" */
1324 .help = "File(s) to use for the workload",
1325 .category = FIO_OPT_C_FILE,
1326 .group = FIO_OPT_G_FILENAME,
1329 .name = "directory",
1330 .lname = "Directory",
1331 .type = FIO_OPT_STR_STORE,
1332 .off1 = td_var_offset(directory),
1333 .cb = str_directory_cb,
1334 .help = "Directory to store files in",
1335 .category = FIO_OPT_C_FILE,
1336 .group = FIO_OPT_G_FILENAME,
1339 .name = "filename_format",
1340 .type = FIO_OPT_STR_STORE,
1341 .off1 = td_var_offset(filename_format),
1342 .prio = -1, /* must come after "directory" */
1343 .help = "Override default $jobname.$jobnum.$filenum naming",
1344 .def = "$jobname.$jobnum.$filenum",
1345 .category = FIO_OPT_C_FILE,
1346 .group = FIO_OPT_G_FILENAME,
1350 .lname = "Lockfile",
1351 .type = FIO_OPT_STR,
1352 .off1 = td_var_offset(file_lock_mode),
1353 .help = "Lock file when doing IO to it",
1355 .parent = "filename",
1358 .cb = str_lockfile_cb,
1359 .category = FIO_OPT_C_FILE,
1360 .group = FIO_OPT_G_FILENAME,
1363 .oval = FILE_LOCK_NONE,
1364 .help = "No file locking",
1366 { .ival = "exclusive",
1367 .oval = FILE_LOCK_EXCLUSIVE,
1368 .help = "Exclusive file lock",
1371 .ival = "readwrite",
1372 .oval = FILE_LOCK_READWRITE,
1373 .help = "Read vs write lock",
1379 .lname = "Open directory",
1380 .type = FIO_OPT_STR_STORE,
1381 .off1 = td_var_offset(opendir),
1382 .cb = str_opendir_cb,
1383 .help = "Recursively add files from this directory and down",
1384 .category = FIO_OPT_C_FILE,
1385 .group = FIO_OPT_G_FILENAME,
1389 .lname = "Read/write",
1390 .alias = "readwrite",
1391 .type = FIO_OPT_STR,
1393 .off1 = td_var_offset(td_ddir),
1394 .help = "IO direction",
1396 .verify = rw_verify,
1397 .category = FIO_OPT_C_IO,
1398 .group = FIO_OPT_G_IO_BASIC,
1401 .oval = TD_DDIR_READ,
1402 .help = "Sequential read",
1405 .oval = TD_DDIR_WRITE,
1406 .help = "Sequential write",
1409 .oval = TD_DDIR_TRIM,
1410 .help = "Sequential trim",
1412 { .ival = "randread",
1413 .oval = TD_DDIR_RANDREAD,
1414 .help = "Random read",
1416 { .ival = "randwrite",
1417 .oval = TD_DDIR_RANDWRITE,
1418 .help = "Random write",
1420 { .ival = "randtrim",
1421 .oval = TD_DDIR_RANDTRIM,
1422 .help = "Random trim",
1426 .help = "Sequential read and write mix",
1428 { .ival = "readwrite",
1430 .help = "Sequential read and write mix",
1433 .oval = TD_DDIR_RANDRW,
1434 .help = "Random read and write mix"
1439 .name = "rw_sequencer",
1440 .lname = "RW Sequencer",
1441 .type = FIO_OPT_STR,
1442 .off1 = td_var_offset(rw_seq),
1443 .help = "IO offset generator modifier",
1444 .def = "sequential",
1445 .category = FIO_OPT_C_IO,
1446 .group = FIO_OPT_G_IO_BASIC,
1448 { .ival = "sequential",
1450 .help = "Generate sequential offsets",
1452 { .ival = "identical",
1453 .oval = RW_SEQ_IDENT,
1454 .help = "Generate identical offsets",
1461 .lname = "IO Engine",
1462 .type = FIO_OPT_STR_STORE,
1463 .off1 = td_var_offset(ioengine),
1464 .help = "IO engine to use",
1465 .def = FIO_PREFERRED_ENGINE,
1466 .category = FIO_OPT_C_IO,
1467 .group = FIO_OPT_G_IO_BASIC,
1470 .help = "Use read/write",
1473 .help = "Use pread/pwrite",
1476 .help = "Use readv/writev",
1478 #ifdef CONFIG_PWRITEV
1480 .help = "Use preadv/pwritev",
1483 #ifdef CONFIG_LIBAIO
1485 .help = "Linux native asynchronous IO",
1488 #ifdef CONFIG_POSIXAIO
1489 { .ival = "posixaio",
1490 .help = "POSIX asynchronous IO",
1493 #ifdef CONFIG_SOLARISAIO
1494 { .ival = "solarisaio",
1495 .help = "Solaris native asynchronous IO",
1498 #ifdef CONFIG_WINDOWSAIO
1499 { .ival = "windowsaio",
1500 .help = "Windows native asynchronous IO"
1505 .help = "Rados Block Device asynchronous IO"
1509 .help = "Memory mapped IO"
1511 #ifdef CONFIG_LINUX_SPLICE
1513 .help = "splice/vmsplice based IO",
1515 { .ival = "netsplice",
1516 .help = "splice/vmsplice to/from the network",
1519 #ifdef FIO_HAVE_SGIO
1521 .help = "SCSI generic v3 IO",
1525 .help = "Testing engine (no data transfer)",
1528 .help = "Network IO",
1531 .help = "CPU cycle burner engine",
1535 .help = "GUASI IO engine",
1538 #ifdef FIO_HAVE_BINJECT
1539 { .ival = "binject",
1540 .help = "binject direct inject block engine",
1545 .help = "RDMA IO engine",
1548 #ifdef CONFIG_FUSION_AW
1549 { .ival = "fusion-aw-sync",
1550 .help = "Fusion-io atomic write engine",
1553 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
1554 { .ival = "e4defrag",
1555 .help = "ext4 defrag engine",
1558 #ifdef CONFIG_LINUX_FALLOCATE
1560 .help = "fallocate() file based engine",
1565 .help = "Glusterfs libgfapi(sync) based engine"
1567 { .ival = "gfapi_async",
1568 .help = "Glusterfs libgfapi(async) based engine"
1571 #ifdef CONFIG_LIBHDFS
1572 { .ival = "libhdfs",
1573 .help = "Hadoop Distributed Filesystem (HDFS) engine"
1576 { .ival = "external",
1577 .help = "Load external engine (append name)",
1583 .lname = "IO Depth",
1584 .type = FIO_OPT_INT,
1585 .off1 = td_var_offset(iodepth),
1586 .help = "Number of IO buffers to keep in flight",
1590 .category = FIO_OPT_C_IO,
1591 .group = FIO_OPT_G_IO_BASIC,
1594 .name = "iodepth_batch",
1595 .lname = "IO Depth batch",
1596 .alias = "iodepth_batch_submit",
1597 .type = FIO_OPT_INT,
1598 .off1 = td_var_offset(iodepth_batch),
1599 .help = "Number of IO buffers to submit in one go",
1600 .parent = "iodepth",
1605 .category = FIO_OPT_C_IO,
1606 .group = FIO_OPT_G_IO_BASIC,
1609 .name = "iodepth_batch_complete",
1610 .lname = "IO Depth batch complete",
1611 .type = FIO_OPT_INT,
1612 .off1 = td_var_offset(iodepth_batch_complete),
1613 .help = "Number of IO buffers to retrieve in one go",
1614 .parent = "iodepth",
1619 .category = FIO_OPT_C_IO,
1620 .group = FIO_OPT_G_IO_BASIC,
1623 .name = "iodepth_low",
1624 .lname = "IO Depth batch low",
1625 .type = FIO_OPT_INT,
1626 .off1 = td_var_offset(iodepth_low),
1627 .help = "Low water mark for queuing depth",
1628 .parent = "iodepth",
1631 .category = FIO_OPT_C_IO,
1632 .group = FIO_OPT_G_IO_BASIC,
1637 .type = FIO_OPT_STR_VAL,
1639 .help = "Total size of device or files",
1640 .interval = 1024 * 1024,
1641 .category = FIO_OPT_C_IO,
1642 .group = FIO_OPT_G_INVALID,
1646 .lname = "IO Limit",
1647 .type = FIO_OPT_STR_VAL,
1648 .off1 = td_var_offset(io_limit),
1649 .interval = 1024 * 1024,
1650 .category = FIO_OPT_C_IO,
1651 .group = FIO_OPT_G_INVALID,
1654 .name = "fill_device",
1655 .lname = "Fill device",
1657 .type = FIO_OPT_BOOL,
1658 .off1 = td_var_offset(fill_device),
1659 .help = "Write until an ENOSPC error occurs",
1661 .category = FIO_OPT_C_FILE,
1662 .group = FIO_OPT_G_INVALID,
1666 .lname = "File size",
1667 .type = FIO_OPT_STR_VAL,
1668 .off1 = td_var_offset(file_size_low),
1669 .off2 = td_var_offset(file_size_high),
1671 .help = "Size of individual files",
1672 .interval = 1024 * 1024,
1673 .category = FIO_OPT_C_FILE,
1674 .group = FIO_OPT_G_INVALID,
1677 .name = "file_append",
1678 .lname = "File append",
1679 .type = FIO_OPT_BOOL,
1680 .off1 = td_var_offset(file_append),
1681 .help = "IO will start at the end of the file(s)",
1683 .category = FIO_OPT_C_FILE,
1684 .group = FIO_OPT_G_INVALID,
1688 .lname = "IO offset",
1689 .alias = "fileoffset",
1690 .type = FIO_OPT_STR_VAL,
1691 .off1 = td_var_offset(start_offset),
1692 .help = "Start IO from this offset",
1694 .interval = 1024 * 1024,
1695 .category = FIO_OPT_C_IO,
1696 .group = FIO_OPT_G_INVALID,
1699 .name = "offset_increment",
1700 .lname = "IO offset increment",
1701 .type = FIO_OPT_STR_VAL,
1702 .off1 = td_var_offset(offset_increment),
1703 .help = "What is the increment from one offset to the next",
1707 .interval = 1024 * 1024,
1708 .category = FIO_OPT_C_IO,
1709 .group = FIO_OPT_G_INVALID,
1712 .name = "number_ios",
1713 .lname = "Number of IOs to perform",
1714 .type = FIO_OPT_STR_VAL,
1715 .off1 = td_var_offset(number_ios),
1716 .help = "Force job completion of this number of IOs",
1718 .category = FIO_OPT_C_IO,
1719 .group = FIO_OPT_G_INVALID,
1723 .lname = "Block size",
1724 .alias = "blocksize",
1725 .type = FIO_OPT_INT,
1726 .off1 = td_var_offset(bs[DDIR_READ]),
1727 .off2 = td_var_offset(bs[DDIR_WRITE]),
1728 .off3 = td_var_offset(bs[DDIR_TRIM]),
1730 .help = "Block size unit",
1735 .category = FIO_OPT_C_IO,
1736 .group = FIO_OPT_G_INVALID,
1740 .lname = "Block size align",
1741 .alias = "blockalign",
1742 .type = FIO_OPT_INT,
1743 .off1 = td_var_offset(ba[DDIR_READ]),
1744 .off2 = td_var_offset(ba[DDIR_WRITE]),
1745 .off3 = td_var_offset(ba[DDIR_TRIM]),
1747 .help = "IO block offset alignment",
1751 .category = FIO_OPT_C_IO,
1752 .group = FIO_OPT_G_INVALID,
1756 .lname = "Block size range",
1757 .alias = "blocksize_range",
1758 .type = FIO_OPT_RANGE,
1759 .off1 = td_var_offset(min_bs[DDIR_READ]),
1760 .off2 = td_var_offset(max_bs[DDIR_READ]),
1761 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
1762 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
1763 .off5 = td_var_offset(min_bs[DDIR_TRIM]),
1764 .off6 = td_var_offset(max_bs[DDIR_TRIM]),
1766 .help = "Set block size range (in more detail than bs)",
1770 .category = FIO_OPT_C_IO,
1771 .group = FIO_OPT_G_INVALID,
1775 .lname = "Block size split",
1776 .type = FIO_OPT_STR,
1777 .cb = str_bssplit_cb,
1778 .help = "Set a specific mix of block sizes",
1781 .category = FIO_OPT_C_IO,
1782 .group = FIO_OPT_G_INVALID,
1785 .name = "bs_unaligned",
1786 .lname = "Block size unaligned",
1787 .alias = "blocksize_unaligned",
1788 .type = FIO_OPT_STR_SET,
1789 .off1 = td_var_offset(bs_unaligned),
1790 .help = "Don't sector align IO buffer sizes",
1793 .category = FIO_OPT_C_IO,
1794 .group = FIO_OPT_G_INVALID,
1797 .name = "bs_is_seq_rand",
1798 .lname = "Block size division is seq/random (not read/write)",
1799 .type = FIO_OPT_BOOL,
1800 .off1 = td_var_offset(bs_is_seq_rand),
1801 .help = "Consider any blocksize setting to be sequential,ramdom",
1803 .parent = "blocksize",
1804 .category = FIO_OPT_C_IO,
1805 .group = FIO_OPT_G_INVALID,
1808 .name = "randrepeat",
1809 .lname = "Random repeatable",
1810 .type = FIO_OPT_BOOL,
1811 .off1 = td_var_offset(rand_repeatable),
1812 .help = "Use repeatable random IO pattern",
1816 .category = FIO_OPT_C_IO,
1817 .group = FIO_OPT_G_RANDOM,
1821 .lname = "The random generator seed",
1822 .type = FIO_OPT_STR_VAL,
1823 .off1 = td_var_offset(rand_seed),
1824 .help = "Set the random generator seed value",
1826 .category = FIO_OPT_C_IO,
1827 .group = FIO_OPT_G_RANDOM,
1830 .name = "use_os_rand",
1831 .lname = "Use OS random",
1832 .type = FIO_OPT_BOOL,
1833 .off1 = td_var_offset(use_os_rand),
1834 .help = "Set to use OS random generator",
1838 .category = FIO_OPT_C_IO,
1839 .group = FIO_OPT_G_RANDOM,
1842 .name = "norandommap",
1843 .lname = "No randommap",
1844 .type = FIO_OPT_STR_SET,
1845 .off1 = td_var_offset(norandommap),
1846 .help = "Accept potential duplicate random blocks",
1850 .category = FIO_OPT_C_IO,
1851 .group = FIO_OPT_G_RANDOM,
1854 .name = "softrandommap",
1855 .lname = "Soft randommap",
1856 .type = FIO_OPT_BOOL,
1857 .off1 = td_var_offset(softrandommap),
1858 .help = "Set norandommap if randommap allocation fails",
1859 .parent = "norandommap",
1862 .category = FIO_OPT_C_IO,
1863 .group = FIO_OPT_G_RANDOM,
1866 .name = "random_generator",
1867 .type = FIO_OPT_STR,
1868 .off1 = td_var_offset(random_generator),
1869 .help = "Type of random number generator to use",
1870 .def = "tausworthe",
1872 { .ival = "tausworthe",
1873 .oval = FIO_RAND_GEN_TAUSWORTHE,
1874 .help = "Strong Tausworthe generator",
1877 .oval = FIO_RAND_GEN_LFSR,
1878 .help = "Variable length LFSR",
1881 .category = FIO_OPT_C_IO,
1882 .group = FIO_OPT_G_RANDOM,
1885 .name = "random_distribution",
1886 .type = FIO_OPT_STR,
1887 .off1 = td_var_offset(random_distribution),
1888 .cb = str_random_distribution_cb,
1889 .help = "Random offset distribution generator",
1893 .oval = FIO_RAND_DIST_RANDOM,
1894 .help = "Completely random",
1897 .oval = FIO_RAND_DIST_ZIPF,
1898 .help = "Zipf distribution",
1901 .oval = FIO_RAND_DIST_PARETO,
1902 .help = "Pareto distribution",
1905 .category = FIO_OPT_C_IO,
1906 .group = FIO_OPT_G_RANDOM,
1909 .name = "percentage_random",
1910 .lname = "Percentage Random",
1911 .type = FIO_OPT_INT,
1912 .off1 = td_var_offset(perc_rand[DDIR_READ]),
1913 .off2 = td_var_offset(perc_rand[DDIR_WRITE]),
1914 .off3 = td_var_offset(perc_rand[DDIR_TRIM]),
1916 .help = "Percentage of seq/random mix that should be random",
1917 .def = "100,100,100",
1919 .inverse = "percentage_sequential",
1920 .category = FIO_OPT_C_IO,
1921 .group = FIO_OPT_G_RANDOM,
1924 .name = "percentage_sequential",
1925 .lname = "Percentage Sequential",
1926 .type = FIO_OPT_DEPRECATED,
1927 .category = FIO_OPT_C_IO,
1928 .group = FIO_OPT_G_RANDOM,
1931 .name = "allrandrepeat",
1932 .type = FIO_OPT_BOOL,
1933 .off1 = td_var_offset(allrand_repeatable),
1934 .help = "Use repeatable random numbers for everything",
1936 .category = FIO_OPT_C_IO,
1937 .group = FIO_OPT_G_RANDOM,
1941 .lname = "Number of files",
1942 .alias = "nr_files",
1943 .type = FIO_OPT_INT,
1944 .off1 = td_var_offset(nr_files),
1945 .help = "Split job workload between this number of files",
1948 .category = FIO_OPT_C_FILE,
1949 .group = FIO_OPT_G_INVALID,
1952 .name = "openfiles",
1953 .lname = "Number of open files",
1954 .type = FIO_OPT_INT,
1955 .off1 = td_var_offset(open_files),
1956 .help = "Number of files to keep open at the same time",
1957 .category = FIO_OPT_C_FILE,
1958 .group = FIO_OPT_G_INVALID,
1961 .name = "file_service_type",
1962 .lname = "File service type",
1963 .type = FIO_OPT_STR,
1965 .off1 = td_var_offset(file_service_type),
1966 .help = "How to select which file to service next",
1967 .def = "roundrobin",
1968 .category = FIO_OPT_C_FILE,
1969 .group = FIO_OPT_G_INVALID,
1972 .oval = FIO_FSERVICE_RANDOM,
1973 .help = "Choose a file at random",
1975 { .ival = "roundrobin",
1976 .oval = FIO_FSERVICE_RR,
1977 .help = "Round robin select files",
1979 { .ival = "sequential",
1980 .oval = FIO_FSERVICE_SEQ,
1981 .help = "Finish one file before moving to the next",
1984 .parent = "nrfiles",
1987 #ifdef CONFIG_POSIX_FALLOCATE
1989 .name = "fallocate",
1990 .lname = "Fallocate",
1991 .type = FIO_OPT_STR,
1992 .off1 = td_var_offset(fallocate_mode),
1993 .help = "Whether pre-allocation is performed when laying out files",
1995 .category = FIO_OPT_C_FILE,
1996 .group = FIO_OPT_G_INVALID,
1999 .oval = FIO_FALLOCATE_NONE,
2000 .help = "Do not pre-allocate space",
2003 .oval = FIO_FALLOCATE_POSIX,
2004 .help = "Use posix_fallocate()",
2006 #ifdef CONFIG_LINUX_FALLOCATE
2008 .oval = FIO_FALLOCATE_KEEP_SIZE,
2009 .help = "Use fallocate(..., FALLOC_FL_KEEP_SIZE, ...)",
2012 /* Compatibility with former boolean values */
2014 .oval = FIO_FALLOCATE_NONE,
2015 .help = "Alias for 'none'",
2018 .oval = FIO_FALLOCATE_POSIX,
2019 .help = "Alias for 'posix'",
2023 #endif /* CONFIG_POSIX_FALLOCATE */
2025 .name = "fadvise_hint",
2026 .lname = "Fadvise hint",
2027 .type = FIO_OPT_BOOL,
2028 .off1 = td_var_offset(fadvise_hint),
2029 .help = "Use fadvise() to advise the kernel on IO pattern",
2031 .category = FIO_OPT_C_FILE,
2032 .group = FIO_OPT_G_INVALID,
2037 .type = FIO_OPT_INT,
2038 .off1 = td_var_offset(fsync_blocks),
2039 .help = "Issue fsync for writes every given number of blocks",
2042 .category = FIO_OPT_C_FILE,
2043 .group = FIO_OPT_G_INVALID,
2046 .name = "fdatasync",
2047 .lname = "Fdatasync",
2048 .type = FIO_OPT_INT,
2049 .off1 = td_var_offset(fdatasync_blocks),
2050 .help = "Issue fdatasync for writes every given number of blocks",
2053 .category = FIO_OPT_C_FILE,
2054 .group = FIO_OPT_G_INVALID,
2057 .name = "write_barrier",
2058 .lname = "Write barrier",
2059 .type = FIO_OPT_INT,
2060 .off1 = td_var_offset(barrier_blocks),
2061 .help = "Make every Nth write a barrier write",
2064 .category = FIO_OPT_C_IO,
2065 .group = FIO_OPT_G_INVALID,
2067 #ifdef CONFIG_SYNC_FILE_RANGE
2069 .name = "sync_file_range",
2070 .lname = "Sync file range",
2072 { .ival = "wait_before",
2073 .oval = SYNC_FILE_RANGE_WAIT_BEFORE,
2074 .help = "SYNC_FILE_RANGE_WAIT_BEFORE",
2078 .oval = SYNC_FILE_RANGE_WRITE,
2079 .help = "SYNC_FILE_RANGE_WRITE",
2083 .ival = "wait_after",
2084 .oval = SYNC_FILE_RANGE_WAIT_AFTER,
2085 .help = "SYNC_FILE_RANGE_WAIT_AFTER",
2089 .type = FIO_OPT_STR_MULTI,
2091 .off1 = td_var_offset(sync_file_range),
2092 .help = "Use sync_file_range()",
2093 .category = FIO_OPT_C_FILE,
2094 .group = FIO_OPT_G_INVALID,
2099 .lname = "Direct I/O",
2100 .type = FIO_OPT_BOOL,
2101 .off1 = td_var_offset(odirect),
2102 .help = "Use O_DIRECT IO (negates buffered)",
2104 .inverse = "buffered",
2105 .category = FIO_OPT_C_IO,
2106 .group = FIO_OPT_G_IO_TYPE,
2110 .lname = "Atomic I/O",
2111 .type = FIO_OPT_BOOL,
2112 .off1 = td_var_offset(oatomic),
2113 .help = "Use Atomic IO with O_DIRECT (implies O_DIRECT)",
2115 .category = FIO_OPT_C_IO,
2116 .group = FIO_OPT_G_IO_TYPE,
2120 .lname = "Buffered I/O",
2121 .type = FIO_OPT_BOOL,
2122 .off1 = td_var_offset(odirect),
2124 .help = "Use buffered IO (negates direct)",
2126 .inverse = "direct",
2127 .category = FIO_OPT_C_IO,
2128 .group = FIO_OPT_G_IO_TYPE,
2131 .name = "overwrite",
2132 .lname = "Overwrite",
2133 .type = FIO_OPT_BOOL,
2134 .off1 = td_var_offset(overwrite),
2135 .help = "When writing, set whether to overwrite current data",
2137 .category = FIO_OPT_C_FILE,
2138 .group = FIO_OPT_G_INVALID,
2143 .type = FIO_OPT_INT,
2144 .off1 = td_var_offset(loops),
2145 .help = "Number of times to run the job",
2148 .category = FIO_OPT_C_GENERAL,
2149 .group = FIO_OPT_G_RUNTIME,
2153 .lname = "Number of jobs",
2154 .type = FIO_OPT_INT,
2155 .off1 = td_var_offset(numjobs),
2156 .help = "Duplicate this job this many times",
2159 .category = FIO_OPT_C_GENERAL,
2160 .group = FIO_OPT_G_RUNTIME,
2163 .name = "startdelay",
2164 .lname = "Start delay",
2165 .type = FIO_OPT_STR_VAL_TIME,
2166 .off1 = td_var_offset(start_delay),
2167 .off2 = td_var_offset(start_delay_high),
2168 .help = "Only start job when this period has passed",
2171 .category = FIO_OPT_C_GENERAL,
2172 .group = FIO_OPT_G_RUNTIME,
2178 .type = FIO_OPT_STR_VAL_TIME,
2179 .off1 = td_var_offset(timeout),
2180 .help = "Stop workload when this amount of time has passed",
2183 .category = FIO_OPT_C_GENERAL,
2184 .group = FIO_OPT_G_RUNTIME,
2187 .name = "time_based",
2188 .lname = "Time based",
2189 .type = FIO_OPT_STR_SET,
2190 .off1 = td_var_offset(time_based),
2191 .help = "Keep running until runtime/timeout is met",
2192 .category = FIO_OPT_C_GENERAL,
2193 .group = FIO_OPT_G_RUNTIME,
2196 .name = "verify_only",
2197 .lname = "Verify only",
2198 .type = FIO_OPT_STR_SET,
2199 .off1 = td_var_offset(verify_only),
2200 .help = "Verifies previously written data is still valid",
2201 .category = FIO_OPT_C_GENERAL,
2202 .group = FIO_OPT_G_RUNTIME,
2205 .name = "ramp_time",
2206 .lname = "Ramp time",
2207 .type = FIO_OPT_STR_VAL_TIME,
2208 .off1 = td_var_offset(ramp_time),
2209 .help = "Ramp up time before measuring performance",
2211 .category = FIO_OPT_C_GENERAL,
2212 .group = FIO_OPT_G_RUNTIME,
2215 .name = "clocksource",
2216 .lname = "Clock source",
2217 .type = FIO_OPT_STR,
2218 .cb = fio_clock_source_cb,
2219 .off1 = td_var_offset(clocksource),
2220 .help = "What type of timing source to use",
2221 .category = FIO_OPT_C_GENERAL,
2222 .group = FIO_OPT_G_CLOCK,
2224 #ifdef CONFIG_GETTIMEOFDAY
2225 { .ival = "gettimeofday",
2227 .help = "Use gettimeofday(2) for timing",
2230 #ifdef CONFIG_CLOCK_GETTIME
2231 { .ival = "clock_gettime",
2232 .oval = CS_CGETTIME,
2233 .help = "Use clock_gettime(2) for timing",
2236 #ifdef ARCH_HAVE_CPU_CLOCK
2238 .oval = CS_CPUCLOCK,
2239 .help = "Use CPU private clock",
2247 .lname = "I/O Memory",
2248 .type = FIO_OPT_STR,
2250 .off1 = td_var_offset(mem_type),
2251 .help = "Backing type for IO buffers",
2253 .category = FIO_OPT_C_IO,
2254 .group = FIO_OPT_G_INVALID,
2258 .help = "Use malloc(3) for IO buffers",
2260 #ifndef CONFIG_NO_SHM
2263 .help = "Use shared memory segments for IO buffers",
2265 #ifdef FIO_HAVE_HUGETLB
2266 { .ival = "shmhuge",
2267 .oval = MEM_SHMHUGE,
2268 .help = "Like shm, but use huge pages",
2274 .help = "Use mmap(2) (file or anon) for IO buffers",
2276 #ifdef FIO_HAVE_HUGETLB
2277 { .ival = "mmaphuge",
2278 .oval = MEM_MMAPHUGE,
2279 .help = "Like mmap, but use huge pages",
2285 .name = "iomem_align",
2286 .alias = "mem_align",
2287 .lname = "I/O memory alignment",
2288 .type = FIO_OPT_INT,
2289 .off1 = td_var_offset(mem_align),
2291 .help = "IO memory buffer offset alignment",
2295 .category = FIO_OPT_C_IO,
2296 .group = FIO_OPT_G_INVALID,
2301 .type = FIO_OPT_STR,
2302 .off1 = td_var_offset(verify),
2303 .help = "Verify data written",
2305 .category = FIO_OPT_C_IO,
2306 .group = FIO_OPT_G_VERIFY,
2309 .oval = VERIFY_NONE,
2310 .help = "Don't do IO verification",
2314 .help = "Use md5 checksums for verification",
2317 .oval = VERIFY_CRC64,
2318 .help = "Use crc64 checksums for verification",
2321 .oval = VERIFY_CRC32,
2322 .help = "Use crc32 checksums for verification",
2324 { .ival = "crc32c-intel",
2325 .oval = VERIFY_CRC32C,
2326 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2329 .oval = VERIFY_CRC32C,
2330 .help = "Use crc32c checksums for verification (hw assisted, if available)",
2333 .oval = VERIFY_CRC16,
2334 .help = "Use crc16 checksums for verification",
2337 .oval = VERIFY_CRC7,
2338 .help = "Use crc7 checksums for verification",
2341 .oval = VERIFY_SHA1,
2342 .help = "Use sha1 checksums for verification",
2345 .oval = VERIFY_SHA256,
2346 .help = "Use sha256 checksums for verification",
2349 .oval = VERIFY_SHA512,
2350 .help = "Use sha512 checksums for verification",
2353 .oval = VERIFY_XXHASH,
2354 .help = "Use xxhash checksums for verification",
2357 .oval = VERIFY_META,
2358 .help = "Use io information",
2362 .oval = VERIFY_NULL,
2363 .help = "Pretend to verify",
2368 .name = "do_verify",
2369 .lname = "Perform verify step",
2370 .type = FIO_OPT_BOOL,
2371 .off1 = td_var_offset(do_verify),
2372 .help = "Run verification stage after write",
2376 .category = FIO_OPT_C_IO,
2377 .group = FIO_OPT_G_VERIFY,
2380 .name = "verifysort",
2381 .lname = "Verify sort",
2382 .type = FIO_OPT_BOOL,
2383 .off1 = td_var_offset(verifysort),
2384 .help = "Sort written verify blocks for read back",
2388 .category = FIO_OPT_C_IO,
2389 .group = FIO_OPT_G_VERIFY,
2392 .name = "verifysort_nr",
2393 .type = FIO_OPT_INT,
2394 .off1 = td_var_offset(verifysort_nr),
2395 .help = "Pre-load and sort verify blocks for a read workload",
2400 .category = FIO_OPT_C_IO,
2401 .group = FIO_OPT_G_VERIFY,
2404 .name = "verify_interval",
2405 .lname = "Verify interval",
2406 .type = FIO_OPT_INT,
2407 .off1 = td_var_offset(verify_interval),
2408 .minval = 2 * sizeof(struct verify_header),
2409 .help = "Store verify buffer header every N bytes",
2412 .interval = 2 * sizeof(struct verify_header),
2413 .category = FIO_OPT_C_IO,
2414 .group = FIO_OPT_G_VERIFY,
2417 .name = "verify_offset",
2418 .lname = "Verify offset",
2419 .type = FIO_OPT_INT,
2420 .help = "Offset verify header location by N bytes",
2421 .off1 = td_var_offset(verify_offset),
2422 .minval = sizeof(struct verify_header),
2425 .category = FIO_OPT_C_IO,
2426 .group = FIO_OPT_G_VERIFY,
2429 .name = "verify_pattern",
2430 .lname = "Verify pattern",
2431 .type = FIO_OPT_STR,
2432 .cb = str_verify_pattern_cb,
2433 .help = "Fill pattern for IO buffers",
2436 .category = FIO_OPT_C_IO,
2437 .group = FIO_OPT_G_VERIFY,
2440 .name = "verify_fatal",
2441 .lname = "Verify fatal",
2442 .type = FIO_OPT_BOOL,
2443 .off1 = td_var_offset(verify_fatal),
2445 .help = "Exit on a single verify failure, don't continue",
2448 .category = FIO_OPT_C_IO,
2449 .group = FIO_OPT_G_VERIFY,
2452 .name = "verify_dump",
2453 .lname = "Verify dump",
2454 .type = FIO_OPT_BOOL,
2455 .off1 = td_var_offset(verify_dump),
2457 .help = "Dump contents of good and bad blocks on failure",
2460 .category = FIO_OPT_C_IO,
2461 .group = FIO_OPT_G_VERIFY,
2464 .name = "verify_async",
2465 .lname = "Verify asynchronously",
2466 .type = FIO_OPT_INT,
2467 .off1 = td_var_offset(verify_async),
2469 .help = "Number of async verifier threads to use",
2472 .category = FIO_OPT_C_IO,
2473 .group = FIO_OPT_G_VERIFY,
2476 .name = "verify_backlog",
2477 .lname = "Verify backlog",
2478 .type = FIO_OPT_STR_VAL,
2479 .off1 = td_var_offset(verify_backlog),
2480 .help = "Verify after this number of blocks are written",
2483 .category = FIO_OPT_C_IO,
2484 .group = FIO_OPT_G_VERIFY,
2487 .name = "verify_backlog_batch",
2488 .lname = "Verify backlog batch",
2489 .type = FIO_OPT_INT,
2490 .off1 = td_var_offset(verify_batch),
2491 .help = "Verify this number of IO blocks",
2494 .category = FIO_OPT_C_IO,
2495 .group = FIO_OPT_G_VERIFY,
2497 #ifdef FIO_HAVE_CPU_AFFINITY
2499 .name = "verify_async_cpus",
2500 .lname = "Async verify CPUs",
2501 .type = FIO_OPT_STR,
2502 .cb = str_verify_cpus_allowed_cb,
2503 .help = "Set CPUs allowed for async verify threads",
2504 .parent = "verify_async",
2506 .category = FIO_OPT_C_IO,
2507 .group = FIO_OPT_G_VERIFY,
2511 .name = "experimental_verify",
2512 .off1 = td_var_offset(experimental_verify),
2513 .type = FIO_OPT_BOOL,
2514 .help = "Enable experimental verification",
2515 .category = FIO_OPT_C_IO,
2516 .group = FIO_OPT_G_VERIFY,
2518 #ifdef FIO_HAVE_TRIM
2520 .name = "trim_percentage",
2521 .lname = "Trim percentage",
2522 .type = FIO_OPT_INT,
2523 .off1 = td_var_offset(trim_percentage),
2526 .help = "Number of verify blocks to discard/trim",
2531 .category = FIO_OPT_C_IO,
2532 .group = FIO_OPT_G_TRIM,
2535 .name = "trim_verify_zero",
2536 .lname = "Verify trim zero",
2537 .type = FIO_OPT_BOOL,
2538 .help = "Verify that trim/discarded blocks are returned as zeroes",
2539 .off1 = td_var_offset(trim_zero),
2540 .parent = "trim_percentage",
2543 .category = FIO_OPT_C_IO,
2544 .group = FIO_OPT_G_TRIM,
2547 .name = "trim_backlog",
2548 .lname = "Trim backlog",
2549 .type = FIO_OPT_STR_VAL,
2550 .off1 = td_var_offset(trim_backlog),
2551 .help = "Trim after this number of blocks are written",
2552 .parent = "trim_percentage",
2555 .category = FIO_OPT_C_IO,
2556 .group = FIO_OPT_G_TRIM,
2559 .name = "trim_backlog_batch",
2560 .lname = "Trim backlog batch",
2561 .type = FIO_OPT_INT,
2562 .off1 = td_var_offset(trim_batch),
2563 .help = "Trim this number of IO blocks",
2564 .parent = "trim_percentage",
2567 .category = FIO_OPT_C_IO,
2568 .group = FIO_OPT_G_TRIM,
2572 .name = "write_iolog",
2573 .lname = "Write I/O log",
2574 .type = FIO_OPT_STR_STORE,
2575 .off1 = td_var_offset(write_iolog_file),
2576 .help = "Store IO pattern to file",
2577 .category = FIO_OPT_C_IO,
2578 .group = FIO_OPT_G_IOLOG,
2581 .name = "read_iolog",
2582 .lname = "Read I/O log",
2583 .type = FIO_OPT_STR_STORE,
2584 .off1 = td_var_offset(read_iolog_file),
2585 .help = "Playback IO pattern from file",
2586 .category = FIO_OPT_C_IO,
2587 .group = FIO_OPT_G_IOLOG,
2590 .name = "replay_no_stall",
2591 .lname = "Don't stall on replay",
2592 .type = FIO_OPT_BOOL,
2593 .off1 = td_var_offset(no_stall),
2595 .parent = "read_iolog",
2597 .help = "Playback IO pattern file as fast as possible without stalls",
2598 .category = FIO_OPT_C_IO,
2599 .group = FIO_OPT_G_IOLOG,
2602 .name = "replay_redirect",
2603 .lname = "Redirect device for replay",
2604 .type = FIO_OPT_STR_STORE,
2605 .off1 = td_var_offset(replay_redirect),
2606 .parent = "read_iolog",
2608 .help = "Replay all I/O onto this device, regardless of trace device",
2609 .category = FIO_OPT_C_IO,
2610 .group = FIO_OPT_G_IOLOG,
2613 .name = "exec_prerun",
2614 .lname = "Pre-execute runnable",
2615 .type = FIO_OPT_STR_STORE,
2616 .off1 = td_var_offset(exec_prerun),
2617 .help = "Execute this file prior to running job",
2618 .category = FIO_OPT_C_GENERAL,
2619 .group = FIO_OPT_G_INVALID,
2622 .name = "exec_postrun",
2623 .lname = "Post-execute runnable",
2624 .type = FIO_OPT_STR_STORE,
2625 .off1 = td_var_offset(exec_postrun),
2626 .help = "Execute this file after running job",
2627 .category = FIO_OPT_C_GENERAL,
2628 .group = FIO_OPT_G_INVALID,
2630 #ifdef FIO_HAVE_IOSCHED_SWITCH
2632 .name = "ioscheduler",
2633 .lname = "I/O scheduler",
2634 .type = FIO_OPT_STR_STORE,
2635 .off1 = td_var_offset(ioscheduler),
2636 .help = "Use this IO scheduler on the backing device",
2637 .category = FIO_OPT_C_FILE,
2638 .group = FIO_OPT_G_INVALID,
2643 .lname = "Zone size",
2644 .type = FIO_OPT_STR_VAL,
2645 .off1 = td_var_offset(zone_size),
2646 .help = "Amount of data to read per zone",
2648 .interval = 1024 * 1024,
2649 .category = FIO_OPT_C_IO,
2650 .group = FIO_OPT_G_ZONE,
2653 .name = "zonerange",
2654 .lname = "Zone range",
2655 .type = FIO_OPT_STR_VAL,
2656 .off1 = td_var_offset(zone_range),
2657 .help = "Give size of an IO zone",
2659 .interval = 1024 * 1024,
2660 .category = FIO_OPT_C_IO,
2661 .group = FIO_OPT_G_ZONE,
2665 .lname = "Zone skip",
2666 .type = FIO_OPT_STR_VAL,
2667 .off1 = td_var_offset(zone_skip),
2668 .help = "Space between IO zones",
2670 .interval = 1024 * 1024,
2671 .category = FIO_OPT_C_IO,
2672 .group = FIO_OPT_G_ZONE,
2676 .lname = "Lock memory",
2677 .type = FIO_OPT_STR_VAL,
2678 .off1 = td_var_offset(lockmem),
2679 .help = "Lock down this amount of memory (per worker)",
2681 .interval = 1024 * 1024,
2682 .category = FIO_OPT_C_GENERAL,
2683 .group = FIO_OPT_G_INVALID,
2686 .name = "rwmixread",
2687 .lname = "Read/write mix read",
2688 .type = FIO_OPT_INT,
2689 .cb = str_rwmix_read_cb,
2691 .help = "Percentage of mixed workload that is reads",
2694 .inverse = "rwmixwrite",
2695 .category = FIO_OPT_C_IO,
2696 .group = FIO_OPT_G_RWMIX,
2699 .name = "rwmixwrite",
2700 .lname = "Read/write mix write",
2701 .type = FIO_OPT_INT,
2702 .cb = str_rwmix_write_cb,
2704 .help = "Percentage of mixed workload that is writes",
2707 .inverse = "rwmixread",
2708 .category = FIO_OPT_C_IO,
2709 .group = FIO_OPT_G_RWMIX,
2712 .name = "rwmixcycle",
2713 .lname = "Read/write mix cycle",
2714 .type = FIO_OPT_DEPRECATED,
2715 .category = FIO_OPT_C_IO,
2716 .group = FIO_OPT_G_RWMIX,
2721 .type = FIO_OPT_INT,
2722 .off1 = td_var_offset(nice),
2723 .help = "Set job CPU nice value",
2728 .category = FIO_OPT_C_GENERAL,
2729 .group = FIO_OPT_G_CRED,
2731 #ifdef FIO_HAVE_IOPRIO
2734 .lname = "I/O nice priority",
2735 .type = FIO_OPT_INT,
2736 .off1 = td_var_offset(ioprio),
2737 .help = "Set job IO priority value",
2741 .category = FIO_OPT_C_GENERAL,
2742 .group = FIO_OPT_G_CRED,
2745 .name = "prioclass",
2746 .lname = "I/O nice priority class",
2747 .type = FIO_OPT_INT,
2748 .off1 = td_var_offset(ioprio_class),
2749 .help = "Set job IO priority class",
2753 .category = FIO_OPT_C_GENERAL,
2754 .group = FIO_OPT_G_CRED,
2758 .name = "thinktime",
2759 .lname = "Thinktime",
2760 .type = FIO_OPT_INT,
2761 .off1 = td_var_offset(thinktime),
2762 .help = "Idle time between IO buffers (usec)",
2764 .category = FIO_OPT_C_IO,
2765 .group = FIO_OPT_G_THINKTIME,
2768 .name = "thinktime_spin",
2769 .lname = "Thinktime spin",
2770 .type = FIO_OPT_INT,
2771 .off1 = td_var_offset(thinktime_spin),
2772 .help = "Start think time by spinning this amount (usec)",
2774 .parent = "thinktime",
2776 .category = FIO_OPT_C_IO,
2777 .group = FIO_OPT_G_THINKTIME,
2780 .name = "thinktime_blocks",
2781 .lname = "Thinktime blocks",
2782 .type = FIO_OPT_INT,
2783 .off1 = td_var_offset(thinktime_blocks),
2784 .help = "IO buffer period between 'thinktime'",
2786 .parent = "thinktime",
2788 .category = FIO_OPT_C_IO,
2789 .group = FIO_OPT_G_THINKTIME,
2793 .lname = "I/O rate",
2794 .type = FIO_OPT_INT,
2795 .off1 = td_var_offset(rate[DDIR_READ]),
2796 .off2 = td_var_offset(rate[DDIR_WRITE]),
2797 .off3 = td_var_offset(rate[DDIR_TRIM]),
2798 .help = "Set bandwidth rate",
2799 .category = FIO_OPT_C_IO,
2800 .group = FIO_OPT_G_RATE,
2804 .lname = "I/O min rate",
2805 .type = FIO_OPT_INT,
2806 .off1 = td_var_offset(ratemin[DDIR_READ]),
2807 .off2 = td_var_offset(ratemin[DDIR_WRITE]),
2808 .off3 = td_var_offset(ratemin[DDIR_TRIM]),
2809 .help = "Job must meet this rate or it will be shutdown",
2812 .category = FIO_OPT_C_IO,
2813 .group = FIO_OPT_G_RATE,
2816 .name = "rate_iops",
2817 .lname = "I/O rate IOPS",
2818 .type = FIO_OPT_INT,
2819 .off1 = td_var_offset(rate_iops[DDIR_READ]),
2820 .off2 = td_var_offset(rate_iops[DDIR_WRITE]),
2821 .off3 = td_var_offset(rate_iops[DDIR_TRIM]),
2822 .help = "Limit IO used to this number of IO operations/sec",
2824 .category = FIO_OPT_C_IO,
2825 .group = FIO_OPT_G_RATE,
2828 .name = "rate_iops_min",
2829 .lname = "I/O min rate IOPS",
2830 .type = FIO_OPT_INT,
2831 .off1 = td_var_offset(rate_iops_min[DDIR_READ]),
2832 .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]),
2833 .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]),
2834 .help = "Job must meet this rate or it will be shut down",
2835 .parent = "rate_iops",
2837 .category = FIO_OPT_C_IO,
2838 .group = FIO_OPT_G_RATE,
2841 .name = "ratecycle",
2842 .lname = "I/O rate cycle",
2843 .type = FIO_OPT_INT,
2844 .off1 = td_var_offset(ratecycle),
2845 .help = "Window average for rate limits (msec)",
2849 .category = FIO_OPT_C_IO,
2850 .group = FIO_OPT_G_RATE,
2853 .name = "max_latency",
2854 .type = FIO_OPT_INT,
2855 .off1 = td_var_offset(max_latency),
2856 .help = "Maximum tolerated IO latency (usec)",
2857 .category = FIO_OPT_C_IO,
2858 .group = FIO_OPT_G_LATPROF,
2861 .name = "latency_target",
2862 .lname = "Latency Target (usec)",
2863 .type = FIO_OPT_STR_VAL_TIME,
2864 .off1 = td_var_offset(latency_target),
2865 .help = "Ramp to max queue depth supporting this latency",
2866 .category = FIO_OPT_C_IO,
2867 .group = FIO_OPT_G_LATPROF,
2870 .name = "latency_window",
2871 .lname = "Latency Window (usec)",
2872 .type = FIO_OPT_STR_VAL_TIME,
2873 .off1 = td_var_offset(latency_window),
2874 .help = "Time to sustain latency_target",
2875 .category = FIO_OPT_C_IO,
2876 .group = FIO_OPT_G_LATPROF,
2879 .name = "latency_percentile",
2880 .lname = "Latency Percentile",
2881 .type = FIO_OPT_FLOAT_LIST,
2882 .off1 = td_var_offset(latency_percentile),
2883 .help = "Percentile of IOs must be below latency_target",
2888 .category = FIO_OPT_C_IO,
2889 .group = FIO_OPT_G_LATPROF,
2892 .name = "invalidate",
2893 .lname = "Cache invalidate",
2894 .type = FIO_OPT_BOOL,
2895 .off1 = td_var_offset(invalidate_cache),
2896 .help = "Invalidate buffer/page cache prior to running job",
2898 .category = FIO_OPT_C_IO,
2899 .group = FIO_OPT_G_IO_TYPE,
2903 .lname = "Synchronous I/O",
2904 .type = FIO_OPT_BOOL,
2905 .off1 = td_var_offset(sync_io),
2906 .help = "Use O_SYNC for buffered writes",
2908 .parent = "buffered",
2910 .category = FIO_OPT_C_IO,
2911 .group = FIO_OPT_G_IO_TYPE,
2914 .name = "create_serialize",
2915 .lname = "Create serialize",
2916 .type = FIO_OPT_BOOL,
2917 .off1 = td_var_offset(create_serialize),
2918 .help = "Serialize creating of job files",
2920 .category = FIO_OPT_C_FILE,
2921 .group = FIO_OPT_G_INVALID,
2924 .name = "create_fsync",
2925 .lname = "Create fsync",
2926 .type = FIO_OPT_BOOL,
2927 .off1 = td_var_offset(create_fsync),
2928 .help = "fsync file after creation",
2930 .category = FIO_OPT_C_FILE,
2931 .group = FIO_OPT_G_INVALID,
2934 .name = "create_on_open",
2935 .lname = "Create on open",
2936 .type = FIO_OPT_BOOL,
2937 .off1 = td_var_offset(create_on_open),
2938 .help = "Create files when they are opened for IO",
2940 .category = FIO_OPT_C_FILE,
2941 .group = FIO_OPT_G_INVALID,
2944 .name = "create_only",
2945 .type = FIO_OPT_BOOL,
2946 .off1 = td_var_offset(create_only),
2947 .help = "Only perform file creation phase",
2948 .category = FIO_OPT_C_FILE,
2953 .lname = "Pre-read files",
2954 .type = FIO_OPT_BOOL,
2955 .off1 = td_var_offset(pre_read),
2956 .help = "Pre-read files before starting official testing",
2958 .category = FIO_OPT_C_FILE,
2959 .group = FIO_OPT_G_INVALID,
2961 #ifdef FIO_HAVE_CPU_AFFINITY
2964 .lname = "CPU mask",
2965 .type = FIO_OPT_INT,
2966 .cb = str_cpumask_cb,
2967 .help = "CPU affinity mask",
2968 .category = FIO_OPT_C_GENERAL,
2969 .group = FIO_OPT_G_CRED,
2972 .name = "cpus_allowed",
2973 .lname = "CPUs allowed",
2974 .type = FIO_OPT_STR,
2975 .cb = str_cpus_allowed_cb,
2976 .help = "Set CPUs allowed",
2977 .category = FIO_OPT_C_GENERAL,
2978 .group = FIO_OPT_G_CRED,
2981 .name = "cpus_allowed_policy",
2982 .lname = "CPUs allowed distribution policy",
2983 .type = FIO_OPT_STR,
2984 .off1 = td_var_offset(cpus_allowed_policy),
2985 .help = "Distribution policy for cpus_allowed",
2986 .parent = "cpus_allowed",
2990 .oval = FIO_CPUS_SHARED,
2991 .help = "Mask shared between threads",
2994 .oval = FIO_CPUS_SPLIT,
2995 .help = "Mask split between threads",
2998 .category = FIO_OPT_C_GENERAL,
2999 .group = FIO_OPT_G_CRED,
3002 #ifdef CONFIG_LIBNUMA
3004 .name = "numa_cpu_nodes",
3005 .type = FIO_OPT_STR,
3006 .cb = str_numa_cpunodes_cb,
3007 .help = "NUMA CPU nodes bind",
3008 .category = FIO_OPT_C_GENERAL,
3009 .group = FIO_OPT_G_INVALID,
3012 .name = "numa_mem_policy",
3013 .type = FIO_OPT_STR,
3014 .cb = str_numa_mpol_cb,
3015 .help = "NUMA memory policy setup",
3016 .category = FIO_OPT_C_GENERAL,
3017 .group = FIO_OPT_G_INVALID,
3021 .name = "end_fsync",
3022 .lname = "End fsync",
3023 .type = FIO_OPT_BOOL,
3024 .off1 = td_var_offset(end_fsync),
3025 .help = "Include fsync at the end of job",
3027 .category = FIO_OPT_C_FILE,
3028 .group = FIO_OPT_G_INVALID,
3031 .name = "fsync_on_close",
3032 .lname = "Fsync on close",
3033 .type = FIO_OPT_BOOL,
3034 .off1 = td_var_offset(fsync_on_close),
3035 .help = "fsync files on close",
3037 .category = FIO_OPT_C_FILE,
3038 .group = FIO_OPT_G_INVALID,
3042 .lname = "Unlink file",
3043 .type = FIO_OPT_BOOL,
3044 .off1 = td_var_offset(unlink),
3045 .help = "Unlink created files after job has completed",
3047 .category = FIO_OPT_C_FILE,
3048 .group = FIO_OPT_G_INVALID,
3052 .lname = "Exit-all on terminate",
3053 .type = FIO_OPT_STR_SET,
3054 .cb = str_exitall_cb,
3055 .help = "Terminate all jobs when one exits",
3056 .category = FIO_OPT_C_GENERAL,
3057 .group = FIO_OPT_G_PROCESS,
3060 .name = "stonewall",
3061 .lname = "Wait for previous",
3062 .alias = "wait_for_previous",
3063 .type = FIO_OPT_STR_SET,
3064 .off1 = td_var_offset(stonewall),
3065 .help = "Insert a hard barrier between this job and previous",
3066 .category = FIO_OPT_C_GENERAL,
3067 .group = FIO_OPT_G_PROCESS,
3070 .name = "new_group",
3071 .lname = "New group",
3072 .type = FIO_OPT_STR_SET,
3073 .off1 = td_var_offset(new_group),
3074 .help = "Mark the start of a new group (for reporting)",
3075 .category = FIO_OPT_C_GENERAL,
3076 .group = FIO_OPT_G_PROCESS,
3081 .type = FIO_OPT_STR_SET,
3082 .off1 = td_var_offset(use_thread),
3083 .help = "Use threads instead of processes",
3084 #ifdef CONFIG_NO_SHM
3088 .category = FIO_OPT_C_GENERAL,
3089 .group = FIO_OPT_G_PROCESS,
3092 .name = "write_bw_log",
3093 .lname = "Write bandwidth log",
3094 .type = FIO_OPT_STR_STORE,
3095 .off1 = td_var_offset(bw_log_file),
3096 .help = "Write log of bandwidth during run",
3097 .category = FIO_OPT_C_LOG,
3098 .group = FIO_OPT_G_INVALID,
3101 .name = "write_lat_log",
3102 .lname = "Write latency log",
3103 .type = FIO_OPT_STR_STORE,
3104 .off1 = td_var_offset(lat_log_file),
3105 .help = "Write log of latency during run",
3106 .category = FIO_OPT_C_LOG,
3107 .group = FIO_OPT_G_INVALID,
3110 .name = "write_iops_log",
3111 .lname = "Write IOPS log",
3112 .type = FIO_OPT_STR_STORE,
3113 .off1 = td_var_offset(iops_log_file),
3114 .help = "Write log of IOPS during run",
3115 .category = FIO_OPT_C_LOG,
3116 .group = FIO_OPT_G_INVALID,
3119 .name = "log_avg_msec",
3120 .lname = "Log averaging (msec)",
3121 .type = FIO_OPT_INT,
3122 .off1 = td_var_offset(log_avg_msec),
3123 .help = "Average bw/iops/lat logs over this period of time",
3125 .category = FIO_OPT_C_LOG,
3126 .group = FIO_OPT_G_INVALID,
3129 .name = "log_offset",
3130 .lname = "Log offset of IO",
3131 .type = FIO_OPT_BOOL,
3132 .off1 = td_var_offset(log_offset),
3133 .help = "Include offset of IO for each log entry",
3135 .category = FIO_OPT_C_LOG,
3136 .group = FIO_OPT_G_INVALID,
3140 .name = "log_compression",
3141 .lname = "Log compression",
3142 .type = FIO_OPT_INT,
3143 .off1 = td_var_offset(log_gz),
3144 .help = "Log in compressed chunks of this size",
3145 .minval = 32 * 1024 * 1024ULL,
3146 .maxval = 512 * 1024 * 1024ULL,
3147 .category = FIO_OPT_C_LOG,
3148 .group = FIO_OPT_G_INVALID,
3151 .name = "log_store_compressed",
3152 .lname = "Log store compressed",
3153 .type = FIO_OPT_BOOL,
3154 .off1 = td_var_offset(log_gz_store),
3155 .help = "Store logs in a compressed format",
3156 .category = FIO_OPT_C_LOG,
3157 .group = FIO_OPT_G_INVALID,
3161 .name = "bwavgtime",
3162 .lname = "Bandwidth average time",
3163 .type = FIO_OPT_INT,
3164 .off1 = td_var_offset(bw_avg_time),
3165 .help = "Time window over which to calculate bandwidth"
3168 .parent = "write_bw_log",
3171 .category = FIO_OPT_C_LOG,
3172 .group = FIO_OPT_G_INVALID,
3175 .name = "iopsavgtime",
3176 .lname = "IOPS average time",
3177 .type = FIO_OPT_INT,
3178 .off1 = td_var_offset(iops_avg_time),
3179 .help = "Time window over which to calculate IOPS (msec)",
3181 .parent = "write_iops_log",
3184 .category = FIO_OPT_C_LOG,
3185 .group = FIO_OPT_G_INVALID,
3188 .name = "group_reporting",
3189 .lname = "Group reporting",
3190 .type = FIO_OPT_STR_SET,
3191 .off1 = td_var_offset(group_reporting),
3192 .help = "Do reporting on a per-group basis",
3193 .category = FIO_OPT_C_STAT,
3194 .group = FIO_OPT_G_INVALID,
3197 .name = "zero_buffers",
3198 .lname = "Zero I/O buffers",
3199 .type = FIO_OPT_STR_SET,
3200 .off1 = td_var_offset(zero_buffers),
3201 .help = "Init IO buffers to all zeroes",
3202 .category = FIO_OPT_C_IO,
3203 .group = FIO_OPT_G_IO_BUF,
3206 .name = "refill_buffers",
3207 .lname = "Refill I/O buffers",
3208 .type = FIO_OPT_STR_SET,
3209 .off1 = td_var_offset(refill_buffers),
3210 .help = "Refill IO buffers on every IO submit",
3211 .category = FIO_OPT_C_IO,
3212 .group = FIO_OPT_G_IO_BUF,
3215 .name = "scramble_buffers",
3216 .lname = "Scramble I/O buffers",
3217 .type = FIO_OPT_BOOL,
3218 .off1 = td_var_offset(scramble_buffers),
3219 .help = "Slightly scramble buffers on every IO submit",
3221 .category = FIO_OPT_C_IO,
3222 .group = FIO_OPT_G_IO_BUF,
3225 .name = "buffer_pattern",
3226 .lname = "Buffer pattern",
3227 .type = FIO_OPT_STR,
3228 .cb = str_buffer_pattern_cb,
3229 .help = "Fill pattern for IO buffers",
3230 .category = FIO_OPT_C_IO,
3231 .group = FIO_OPT_G_IO_BUF,
3234 .name = "buffer_compress_percentage",
3235 .lname = "Buffer compression percentage",
3236 .type = FIO_OPT_INT,
3237 .cb = str_buffer_compress_cb,
3240 .help = "How compressible the buffer is (approximately)",
3242 .category = FIO_OPT_C_IO,
3243 .group = FIO_OPT_G_IO_BUF,
3246 .name = "buffer_compress_chunk",
3247 .lname = "Buffer compression chunk size",
3248 .type = FIO_OPT_INT,
3249 .off1 = td_var_offset(compress_chunk),
3250 .parent = "buffer_compress_percentage",
3252 .help = "Size of compressible region in buffer",
3254 .category = FIO_OPT_C_IO,
3255 .group = FIO_OPT_G_IO_BUF,
3258 .name = "clat_percentiles",
3259 .lname = "Completion latency percentiles",
3260 .type = FIO_OPT_BOOL,
3261 .off1 = td_var_offset(clat_percentiles),
3262 .help = "Enable the reporting of completion latency percentiles",
3264 .category = FIO_OPT_C_STAT,
3265 .group = FIO_OPT_G_INVALID,
3268 .name = "percentile_list",
3269 .lname = "Completion latency percentile list",
3270 .type = FIO_OPT_FLOAT_LIST,
3271 .off1 = td_var_offset(percentile_list),
3272 .off2 = td_var_offset(percentile_precision),
3273 .help = "Specify a custom list of percentiles to report",
3274 .def = "1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99",
3275 .maxlen = FIO_IO_U_LIST_MAX_LEN,
3278 .category = FIO_OPT_C_STAT,
3279 .group = FIO_OPT_G_INVALID,
3282 #ifdef FIO_HAVE_DISK_UTIL
3284 .name = "disk_util",
3285 .lname = "Disk utilization",
3286 .type = FIO_OPT_BOOL,
3287 .off1 = td_var_offset(do_disk_util),
3288 .help = "Log disk utilization statistics",
3290 .category = FIO_OPT_C_STAT,
3291 .group = FIO_OPT_G_INVALID,
3295 .name = "gtod_reduce",
3296 .lname = "Reduce gettimeofday() calls",
3297 .type = FIO_OPT_BOOL,
3298 .help = "Greatly reduce number of gettimeofday() calls",
3299 .cb = str_gtod_reduce_cb,
3302 .category = FIO_OPT_C_STAT,
3303 .group = FIO_OPT_G_INVALID,
3306 .name = "disable_lat",
3307 .lname = "Disable all latency stats",
3308 .type = FIO_OPT_BOOL,
3309 .off1 = td_var_offset(disable_lat),
3310 .help = "Disable latency numbers",
3311 .parent = "gtod_reduce",
3314 .category = FIO_OPT_C_STAT,
3315 .group = FIO_OPT_G_INVALID,
3318 .name = "disable_clat",
3319 .lname = "Disable completion latency stats",
3320 .type = FIO_OPT_BOOL,
3321 .off1 = td_var_offset(disable_clat),
3322 .help = "Disable completion latency numbers",
3323 .parent = "gtod_reduce",
3326 .category = FIO_OPT_C_STAT,
3327 .group = FIO_OPT_G_INVALID,
3330 .name = "disable_slat",
3331 .lname = "Disable submission latency stats",
3332 .type = FIO_OPT_BOOL,
3333 .off1 = td_var_offset(disable_slat),
3334 .help = "Disable submission latency numbers",
3335 .parent = "gtod_reduce",
3338 .category = FIO_OPT_C_STAT,
3339 .group = FIO_OPT_G_INVALID,
3342 .name = "disable_bw_measurement",
3343 .lname = "Disable bandwidth stats",
3344 .type = FIO_OPT_BOOL,
3345 .off1 = td_var_offset(disable_bw),
3346 .help = "Disable bandwidth logging",
3347 .parent = "gtod_reduce",
3350 .category = FIO_OPT_C_STAT,
3351 .group = FIO_OPT_G_INVALID,
3355 .lname = "Dedicated gettimeofday() CPU",
3356 .type = FIO_OPT_INT,
3357 .cb = str_gtod_cpu_cb,
3358 .help = "Set up dedicated gettimeofday() thread on this CPU",
3359 .verify = gtod_cpu_verify,
3360 .category = FIO_OPT_C_GENERAL,
3361 .group = FIO_OPT_G_CLOCK,
3364 .name = "unified_rw_reporting",
3365 .type = FIO_OPT_BOOL,
3366 .off1 = td_var_offset(unified_rw_rep),
3367 .help = "Unify reporting across data direction",
3369 .category = FIO_OPT_C_GENERAL,
3370 .group = FIO_OPT_G_INVALID,