fio: ioengine flag cleanup
[fio.git] / thread_options.h
CommitLineData
8062f527
JA
1#ifndef FIO_THREAD_OPTIONS_H
2#define FIO_THREAD_OPTIONS_H
3
4#include "arch/arch.h"
5#include "os/os.h"
a8523a6a 6#include "options.h"
8062f527
JA
7#include "stat.h"
8#include "gettime.h"
888677a4 9#include "lib/ieee754.h"
61b9861d 10#include "lib/pattern.h"
3c978125 11#include "td_error.h"
8062f527 12
7b865a2f
BVA
13enum fio_zone_mode {
14 ZONE_MODE_NOT_SPECIFIED = 0,
15 ZONE_MODE_NONE = 1,
16 ZONE_MODE_STRIDED = 2, /* perform I/O in one zone at a time */
17 /* perform I/O across multiple zones simultaneously */
18 ZONE_MODE_ZBD = 3,
19};
20
8062f527
JA
21/*
22 * What type of allocation to use for io buffers
23 */
24enum fio_memtype {
25 MEM_MALLOC = 0, /* ordinary malloc */
26 MEM_SHM, /* use shared memory segments */
27 MEM_SHMHUGE, /* use shared memory segments with huge pages */
28 MEM_MMAP, /* use anonynomous mmap */
29 MEM_MMAPHUGE, /* memory mapped huge file */
217b0f1d 30 MEM_MMAPSHARED, /* use mmap with shared flag */
03553853 31 MEM_CUDA_MALLOC,/* use GPU memory */
8062f527
JA
32};
33
0d71aa98
BD
34/*
35 * What mode to use for deduped data generation
36 */
37enum dedupe_mode {
38 DEDUPE_MODE_REPEAT = 0,
39 DEDUPE_MODE_WORKING_SET = 1,
40};
41
8062f527
JA
42#define ERROR_STR_MAX 128
43
8062f527 44#define BSSPLIT_MAX 64
3154f1ed 45#define ZONESPLIT_MAX 256
8062f527 46
f311f5f3
DLM
47struct split {
48 unsigned int nr;
49 unsigned long long val1[ZONESPLIT_MAX];
50 unsigned long long val2[ZONESPLIT_MAX];
51};
52
68be9966
NC
53struct split_prio {
54 uint64_t bs;
55 int32_t prio;
56 uint32_t perc;
57};
58
8062f527 59struct bssplit {
5fff9543 60 uint64_t bs;
8062f527
JA
61 uint32_t perc;
62};
63
e0a04ac1
JA
64struct zone_split {
65 uint8_t access_perc;
66 uint8_t size_perc;
59466396
JA
67 uint8_t pad[6];
68 uint64_t size;
e0a04ac1
JA
69};
70
a8523a6a
JA
71#define NR_OPTS_SZ (FIO_MAX_OPTS / (8 * sizeof(uint64_t)))
72
cb1402d6
JA
73#define OPT_MAGIC 0x4f50544e
74
8062f527 75struct thread_options {
cb1402d6 76 int magic;
a8523a6a 77 uint64_t set_options[NR_OPTS_SZ];
8062f527
JA
78 char *description;
79 char *name;
9cc8cb91 80 char *wait_for;
8062f527
JA
81 char *directory;
82 char *filename;
83 char *filename_format;
84 char *opendir;
85 char *ioengine;
6730b40f 86 char *ioengine_so_path;
83ea422a 87 char *mmapfile;
8062f527
JA
88 enum td_ddir td_ddir;
89 unsigned int rw_seq;
90 unsigned int kb_base;
91 unsigned int unit_base;
92 unsigned int ddir_seq_nr;
c46fda90 93 long long ddir_seq_add;
8062f527
JA
94 unsigned int iodepth;
95 unsigned int iodepth_low;
96 unsigned int iodepth_batch;
82407585
RP
97 unsigned int iodepth_batch_complete_min;
98 unsigned int iodepth_batch_complete_max;
997b5680 99 unsigned int serialize_overlap;
8062f527 100
922a5be8
JA
101 unsigned int unique_filename;
102
8062f527 103 unsigned long long size;
5be9bf09 104 unsigned long long io_size;
8062f527 105 unsigned int size_percent;
8f39afa7 106 unsigned int size_nz;
8b38f401 107 unsigned int io_size_percent;
8f39afa7 108 unsigned int io_size_nz;
8062f527 109 unsigned int fill_device;
bedc9dc2 110 unsigned int file_append;
8062f527
JA
111 unsigned long long file_size_low;
112 unsigned long long file_size_high;
113 unsigned long long start_offset;
83c8b093 114 unsigned long long start_offset_align;
8f39afa7 115 unsigned int start_offset_nz;
8062f527 116
5fff9543
JF
117 unsigned long long bs[DDIR_RWDIR_CNT];
118 unsigned long long ba[DDIR_RWDIR_CNT];
119 unsigned long long min_bs[DDIR_RWDIR_CNT];
120 unsigned long long max_bs[DDIR_RWDIR_CNT];
8062f527
JA
121 struct bssplit *bssplit[DDIR_RWDIR_CNT];
122 unsigned int bssplit_nr[DDIR_RWDIR_CNT];
123
124 int *ignore_error[ERROR_TYPE_CNT];
125 unsigned int ignore_error_nr[ERROR_TYPE_CNT];
126 unsigned int error_dump;
127
128 unsigned int nr_files;
129 unsigned int open_files;
130 enum file_lock_mode file_lock_mode;
131
132 unsigned int odirect;
d01612f3 133 unsigned int oatomic;
8062f527
JA
134 unsigned int invalidate_cache;
135 unsigned int create_serialize;
136 unsigned int create_fsync;
137 unsigned int create_on_open;
138 unsigned int create_only;
139 unsigned int end_fsync;
140 unsigned int pre_read;
141 unsigned int sync_io;
ae8e559e 142 unsigned int write_hint;
8062f527
JA
143 unsigned int verify;
144 unsigned int do_verify;
8062f527
JA
145 unsigned int verify_interval;
146 unsigned int verify_offset;
1dc47d6b 147 char *verify_pattern;
8062f527 148 unsigned int verify_pattern_bytes;
61b9861d
RP
149 struct pattern_fmt verify_fmt[8];
150 unsigned int verify_fmt_sz;
8062f527
JA
151 unsigned int verify_fatal;
152 unsigned int verify_dump;
153 unsigned int verify_async;
154 unsigned long long verify_backlog;
155 unsigned int verify_batch;
156 unsigned int experimental_verify;
ca09be4b
JA
157 unsigned int verify_state;
158 unsigned int verify_state_save;
8062f527
JA
159 unsigned int use_thread;
160 unsigned int unlink;
39c1c323 161 unsigned int unlink_each_loop;
8062f527
JA
162 unsigned int do_disk_util;
163 unsigned int override_sync;
164 unsigned int rand_repeatable;
363cffa7 165 unsigned long long rand_seed;
8062f527 166 unsigned int log_avg_msec;
1e613c9c
KC
167 unsigned int log_hist_msec;
168 unsigned int log_hist_coarseness;
e6989e10 169 unsigned int log_max;
ae588852 170 unsigned int log_offset;
aee2ab67 171 unsigned int log_gz;
b26317c9 172 unsigned int log_gz_store;
d5b3cfd4 173 unsigned int log_alternate_epoch;
174 unsigned int log_alternate_epoch_clock_id;
8062f527
JA
175 unsigned int norandommap;
176 unsigned int softrandommap;
177 unsigned int bs_unaligned;
178 unsigned int fsync_on_close;
6aca9b3d 179 unsigned int bs_is_seq_rand;
8062f527 180
62167762
JC
181 unsigned int verify_only;
182
8062f527 183 unsigned int random_distribution;
f9cafb12 184 unsigned int exitall_error;
b7f487cf 185
e0a04ac1
JA
186 struct zone_split *zone_split[DDIR_RWDIR_CNT];
187 unsigned int zone_split_nr[DDIR_RWDIR_CNT];
188
888677a4
JA
189 fio_fp64_t zipf_theta;
190 fio_fp64_t pareto_h;
f88cd222 191 fio_fp64_t gauss_dev;
a87c90fd 192 fio_fp64_t random_center;
8062f527
JA
193
194 unsigned int random_generator;
195
d9472271 196 unsigned int perc_rand[DDIR_RWDIR_CNT];
211c9b89 197
8062f527 198 unsigned int hugepage_size;
5fff9543 199 unsigned long long rw_min_bs;
8062f527
JA
200 unsigned int fsync_blocks;
201 unsigned int fdatasync_blocks;
202 unsigned int barrier_blocks;
203 unsigned long long start_delay;
49050b56 204 unsigned long long start_delay_orig;
23ed19b0 205 unsigned long long start_delay_high;
8062f527
JA
206 unsigned long long timeout;
207 unsigned long long ramp_time;
2c5d94bc 208 unsigned int ss_state;
16e56d25
VF
209 fio_fp64_t ss_limit;
210 unsigned long long ss_dur;
211 unsigned long long ss_ramp_time;
90e678ba 212 unsigned long long ss_check_interval;
8062f527
JA
213 unsigned int overwrite;
214 unsigned int bw_avg_time;
215 unsigned int iops_avg_time;
216 unsigned int loops;
217 unsigned long long zone_range;
218 unsigned long long zone_size;
b8dd9750 219 unsigned long long zone_capacity;
8062f527 220 unsigned long long zone_skip;
8f39afa7 221 uint32_t zone_skip_nz;
7b865a2f 222 enum fio_zone_mode zone_mode;
81c6b6cd 223 unsigned long long lockmem;
8062f527
JA
224 enum fio_memtype mem_type;
225 unsigned int mem_align;
226
f7cf63bf 227 unsigned long long max_latency[DDIR_RWDIR_CNT];
8062f527 228
fd56c235
AW
229 unsigned int exit_what;
230 unsigned int stonewall;
8062f527
JA
231 unsigned int new_group;
232 unsigned int numjobs;
233 os_cpu_mask_t cpumask;
8062f527 234 os_cpu_mask_t verify_cpumask;
c08f9fe2 235 os_cpu_mask_t log_gz_cpumask;
c2acfbac 236 unsigned int cpus_allowed_policy;
43522848 237 char *numa_cpunodes;
8062f527
JA
238 unsigned short numa_mem_mode;
239 unsigned int numa_mem_prefer_node;
43522848 240 char *numa_memnodes;
03553853 241 unsigned int gpu_dev_id;
89978a6b 242 unsigned int start_offset_percent;
03553853 243
8062f527
JA
244 unsigned int iolog;
245 unsigned int rwmixcycle;
5054e67c 246 unsigned int rwmix[DDIR_RWDIR_CNT];
8062f527 247 unsigned int nice;
81c6b6cd
JA
248 unsigned int ioprio;
249 unsigned int ioprio_class;
860462da 250 unsigned int ioprio_hint;
8062f527
JA
251 unsigned int file_service_type;
252 unsigned int group_reporting;
8243be59 253 unsigned int stats;
8062f527
JA
254 unsigned int fadvise_hint;
255 enum fio_fallocate_mode fallocate_mode;
256 unsigned int zero_buffers;
257 unsigned int refill_buffers;
258 unsigned int scramble_buffers;
1dc47d6b 259 char *buffer_pattern;
ce35b1ec 260 unsigned int buffer_pattern_bytes;
8062f527
JA
261 unsigned int compress_percentage;
262 unsigned int compress_chunk;
5c94b008 263 unsigned int dedupe_percentage;
0d71aa98
BD
264 unsigned int dedupe_mode;
265 unsigned int dedupe_working_set_percentage;
c49cfc76 266 unsigned int dedupe_global;
8062f527
JA
267 unsigned int time_based;
268 unsigned int disable_lat;
269 unsigned int disable_clat;
270 unsigned int disable_slat;
271 unsigned int disable_bw;
272 unsigned int unified_rw_rep;
273 unsigned int gtod_reduce;
274 unsigned int gtod_cpu;
12d325ca 275 unsigned int job_start_clock_id;
8062f527
JA
276 enum fio_cs clocksource;
277 unsigned int no_stall;
278 unsigned int trim_percentage;
279 unsigned int trim_batch;
280 unsigned int trim_zero;
281 unsigned long long trim_backlog;
282 unsigned int clat_percentiles;
56440e63 283 unsigned int slat_percentiles;
b599759b 284 unsigned int lat_percentiles;
8062f527
JA
285 unsigned int percentile_precision; /* digits after decimal for percentiles */
286 fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
287
288 char *read_iolog_file;
98e7161c 289 bool read_iolog_chunked;
8062f527 290 char *write_iolog_file;
b9921d1a 291 char *merge_blktrace_file;
87a48ada 292 fio_fp64_t merge_blktrace_scalars[FIO_IO_U_LIST_MAX_LEN];
55bfd8c8 293 fio_fp64_t merge_blktrace_iters[FIO_IO_U_LIST_MAX_LEN];
dded427c
OS
294
295 unsigned int write_bw_log;
296 unsigned int write_lat_log;
297 unsigned int write_iops_log;
298 unsigned int write_hist_log;
299
8062f527
JA
300 char *bw_log_file;
301 char *lat_log_file;
302 char *iops_log_file;
1e613c9c 303 char *hist_log_file;
8062f527
JA
304 char *replay_redirect;
305
306 /*
307 * Pre-run and post-run shell
308 */
309 char *exec_prerun;
310 char *exec_postrun;
311
0d8cc753
CL
312 unsigned int thinkcycles;
313
f7942acd
SK
314 unsigned int thinktime;
315 unsigned int thinktime_spin;
316 unsigned int thinktime_blocks;
317 unsigned int thinktime_blocks_type;
318 unsigned int thinktime_iotime;
319
90eff1c9
SW
320 uint64_t rate[DDIR_RWDIR_CNT];
321 uint64_t ratemin[DDIR_RWDIR_CNT];
8062f527 322 unsigned int ratecycle;
a9da8ab2 323 unsigned int io_submit_mode;
8062f527
JA
324 unsigned int rate_iops[DDIR_RWDIR_CNT];
325 unsigned int rate_iops_min[DDIR_RWDIR_CNT];
6de65959 326 unsigned int rate_process;
1a9bf814 327 unsigned int rate_ign_think;
8062f527
JA
328
329 char *ioscheduler;
330
8062f527
JA
331 /*
332 * I/O Error handling
333 */
334 enum error_type continue_on_error;
335
336 /*
337 * Benchmark profile type
338 */
339 char *profile;
340
341 /*
342 * blkio cgroup support
343 */
344 char *cgroup;
345 unsigned int cgroup_weight;
346 unsigned int cgroup_nodelete;
347
348 unsigned int uid;
349 unsigned int gid;
350
0b288ba1 351 unsigned int offset_increment_percent;
8f39afa7 352 unsigned int offset_increment_nz;
8062f527 353 unsigned long long offset_increment;
ddf24e42 354 unsigned long long number_ios;
8062f527 355
b3251e31
AK
356 unsigned int num_range;
357
8062f527 358 unsigned int sync_file_range;
3e260a46
JA
359
360 unsigned long long latency_target;
361 unsigned long long latency_window;
e1bcd541 362 uint32_t latency_run;
0d8cc753 363 fio_fp64_t latency_percentile;
66347cfa 364
d4e74fda
DB
365 /*
366 * flow support
367 */
368 int flow_id;
369 unsigned int flow;
370 unsigned int flow_sleep;
371
e883cb35
JF
372 unsigned int sig_figs;
373
66347cfa 374 unsigned block_error_hist;
0c63576e
JA
375
376 unsigned int replay_align;
377 unsigned int replay_scale;
6dd7fa77 378 unsigned int replay_time_scale;
d7235efb 379 unsigned int replay_skip;
3a5db920
JA
380
381 unsigned int per_job_logs;
2378826d
JA
382
383 unsigned int allow_create;
e81ecca3 384 unsigned int allow_mounted_write;
bfbdd35b
BVA
385
386 /* Parameters that affect zonemode=zbd */
387 unsigned int read_beyond_wp;
59b07544 388 int max_open_zones;
219c662d 389 unsigned int job_max_open_zones;
575686bb 390 unsigned int ignore_zone_limits;
a7c2b6fc
BVA
391 fio_fp64_t zrt;
392 fio_fp64_t zrf;
03ec570f 393
a7e8aae0
KB
394#define FIO_MAX_PLIS 16
395 unsigned int fdp;
d3e310c5 396 unsigned int fdp_pli_select;
a7e8aae0
KB
397 unsigned int fdp_plis[FIO_MAX_PLIS];
398 unsigned int fdp_nrpli;
399
0a852a50 400 unsigned int log_entries;
03ec570f 401 unsigned int log_prio;
8062f527
JA
402};
403
2dc1cbb5
JA
404#define FIO_TOP_STR_MAX 256
405
406struct thread_options_pack {
a8523a6a 407 uint64_t set_options[NR_OPTS_SZ];
2dc1cbb5
JA
408 uint8_t description[FIO_TOP_STR_MAX];
409 uint8_t name[FIO_TOP_STR_MAX];
9cc8cb91 410 uint8_t wait_for[FIO_TOP_STR_MAX];
2dc1cbb5
JA
411 uint8_t directory[FIO_TOP_STR_MAX];
412 uint8_t filename[FIO_TOP_STR_MAX];
22f80458 413 uint8_t filename_format[FIO_TOP_STR_MAX];
2dc1cbb5
JA
414 uint8_t opendir[FIO_TOP_STR_MAX];
415 uint8_t ioengine[FIO_TOP_STR_MAX];
83ea422a 416 uint8_t mmapfile[FIO_TOP_STR_MAX];
2dc1cbb5
JA
417 uint32_t td_ddir;
418 uint32_t rw_seq;
419 uint32_t kb_base;
22f80458 420 uint32_t unit_base;
2dc1cbb5
JA
421 uint32_t ddir_seq_nr;
422 uint64_t ddir_seq_add;
423 uint32_t iodepth;
424 uint32_t iodepth_low;
425 uint32_t iodepth_batch;
82407585
RP
426 uint32_t iodepth_batch_complete_min;
427 uint32_t iodepth_batch_complete_max;
997b5680 428 uint32_t serialize_overlap;
2dc1cbb5
JA
429
430 uint64_t size;
5be9bf09 431 uint64_t io_size;
2dc1cbb5 432 uint32_t size_percent;
8f39afa7 433 uint32_t size_nz;
8b38f401 434 uint32_t io_size_percent;
8f39afa7 435 uint32_t io_size_nz;
2dc1cbb5 436 uint32_t fill_device;
bedc9dc2 437 uint32_t file_append;
922a5be8 438 uint32_t unique_filename;
2dc1cbb5
JA
439 uint64_t file_size_low;
440 uint64_t file_size_high;
441 uint64_t start_offset;
83c8b093 442 uint64_t start_offset_align;
8f39afa7 443 uint32_t start_offset_nz;
2dc1cbb5 444
5fff9543
JF
445 uint64_t bs[DDIR_RWDIR_CNT];
446 uint64_t ba[DDIR_RWDIR_CNT];
447 uint64_t min_bs[DDIR_RWDIR_CNT];
448 uint64_t max_bs[DDIR_RWDIR_CNT];
b999b3c7
JA
449 struct bssplit bssplit[DDIR_RWDIR_CNT][BSSPLIT_MAX];
450 uint32_t bssplit_nr[DDIR_RWDIR_CNT];
2dc1cbb5 451
e65a950a
JA
452 uint32_t ignore_error[ERROR_TYPE_CNT][ERROR_STR_MAX];
453 uint32_t ignore_error_nr[ERROR_TYPE_CNT];
454 uint32_t error_dump;
455
2dc1cbb5
JA
456 uint32_t nr_files;
457 uint32_t open_files;
458 uint32_t file_lock_mode;
2dc1cbb5
JA
459
460 uint32_t odirect;
d01612f3 461 uint32_t oatomic;
2dc1cbb5
JA
462 uint32_t invalidate_cache;
463 uint32_t create_serialize;
464 uint32_t create_fsync;
465 uint32_t create_on_open;
fb390e24 466 uint32_t create_only;
2dc1cbb5
JA
467 uint32_t end_fsync;
468 uint32_t pre_read;
469 uint32_t sync_io;
ae8e559e 470 uint32_t write_hint;
2dc1cbb5
JA
471 uint32_t verify;
472 uint32_t do_verify;
2dc1cbb5
JA
473 uint32_t verify_interval;
474 uint32_t verify_offset;
2dc1cbb5
JA
475 uint32_t verify_pattern_bytes;
476 uint32_t verify_fatal;
477 uint32_t verify_dump;
478 uint32_t verify_async;
479 uint64_t verify_backlog;
480 uint32_t verify_batch;
836fcc0f 481 uint32_t experimental_verify;
ca09be4b
JA
482 uint32_t verify_state;
483 uint32_t verify_state_save;
2dc1cbb5
JA
484 uint32_t use_thread;
485 uint32_t unlink;
39c1c323 486 uint32_t unlink_each_loop;
2dc1cbb5
JA
487 uint32_t do_disk_util;
488 uint32_t override_sync;
489 uint32_t rand_repeatable;
363cffa7 490 uint64_t rand_seed;
2dc1cbb5 491 uint32_t log_avg_msec;
1e613c9c
KC
492 uint32_t log_hist_msec;
493 uint32_t log_hist_coarseness;
e6989e10 494 uint32_t log_max;
ae588852 495 uint32_t log_offset;
aee2ab67 496 uint32_t log_gz;
b26317c9 497 uint32_t log_gz_store;
d5b3cfd4 498 uint32_t log_alternate_epoch;
499 uint32_t log_alternate_epoch_clock_id;
2dc1cbb5
JA
500 uint32_t norandommap;
501 uint32_t softrandommap;
502 uint32_t bs_unaligned;
503 uint32_t fsync_on_close;
6aca9b3d 504 uint32_t bs_is_seq_rand;
2dc1cbb5 505
1e5324e7 506 uint32_t random_distribution;
f9cafb12 507 uint32_t exitall_error;
af7d9f1f
JA
508
509 uint32_t sync_file_range;
e0a04ac1
JA
510
511 struct zone_split zone_split[DDIR_RWDIR_CNT][ZONESPLIT_MAX];
512 uint32_t zone_split_nr[DDIR_RWDIR_CNT];
f88cd222 513
1e5324e7
JA
514 fio_fp64_t zipf_theta;
515 fio_fp64_t pareto_h;
f88cd222 516 fio_fp64_t gauss_dev;
a87c90fd 517 fio_fp64_t random_center;
1e5324e7 518
49758e11
JA
519 uint32_t random_generator;
520
d9472271 521 uint32_t perc_rand[DDIR_RWDIR_CNT];
211c9b89 522
2dc1cbb5 523 uint32_t hugepage_size;
5fff9543 524 uint64_t rw_min_bs;
2dc1cbb5
JA
525 uint32_t fsync_blocks;
526 uint32_t fdatasync_blocks;
527 uint32_t barrier_blocks;
528 uint64_t start_delay;
23ed19b0 529 uint64_t start_delay_high;
2dc1cbb5
JA
530 uint64_t timeout;
531 uint64_t ramp_time;
72863286
JA
532 uint64_t ss_dur;
533 uint64_t ss_ramp_time;
2c5d94bc 534 uint32_t ss_state;
72863286 535 fio_fp64_t ss_limit;
90e678ba 536 uint64_t ss_check_interval;
2dc1cbb5
JA
537 uint32_t overwrite;
538 uint32_t bw_avg_time;
539 uint32_t iops_avg_time;
540 uint32_t loops;
541 uint64_t zone_range;
542 uint64_t zone_size;
b8dd9750 543 uint64_t zone_capacity;
2dc1cbb5 544 uint64_t zone_skip;
ae278f9a 545 uint64_t lockmem;
8f39afa7 546 uint32_t zone_skip_nz;
2dc1cbb5
JA
547 uint32_t mem_type;
548 uint32_t mem_align;
549
fd56c235
AW
550 uint32_t exit_what;
551 uint32_t stonewall;
2dc1cbb5
JA
552 uint32_t new_group;
553 uint32_t numjobs;
33f42c20 554
57535f41
JA
555 /*
556 * We currently can't convert these, so don't enable them
557 */
558#if 0
2dc1cbb5 559 uint8_t cpumask[FIO_TOP_STR_MAX];
2dc1cbb5 560 uint8_t verify_cpumask[FIO_TOP_STR_MAX];
c08f9fe2 561 uint8_t log_gz_cpumask[FIO_TOP_STR_MAX];
57535f41 562#endif
6599ce5a 563 uint32_t gpu_dev_id;
89978a6b 564 uint32_t start_offset_percent;
c2acfbac 565 uint32_t cpus_allowed_policy;
2dc1cbb5
JA
566 uint32_t iolog;
567 uint32_t rwmixcycle;
5054e67c 568 uint32_t rwmix[DDIR_RWDIR_CNT];
2dc1cbb5 569 uint32_t nice;
28727df7
JA
570 uint32_t ioprio;
571 uint32_t ioprio_class;
860462da 572 uint32_t ioprio_hint;
2dc1cbb5
JA
573 uint32_t file_service_type;
574 uint32_t group_reporting;
8243be59 575 uint32_t stats;
2dc1cbb5
JA
576 uint32_t fadvise_hint;
577 uint32_t fallocate_mode;
578 uint32_t zero_buffers;
579 uint32_t refill_buffers;
580 uint32_t scramble_buffers;
ce35b1ec 581 uint32_t buffer_pattern_bytes;
5c94b008
JA
582 uint32_t compress_percentage;
583 uint32_t compress_chunk;
584 uint32_t dedupe_percentage;
0d71aa98
BD
585 uint32_t dedupe_mode;
586 uint32_t dedupe_working_set_percentage;
c49cfc76 587 uint32_t dedupe_global;
2dc1cbb5
JA
588 uint32_t time_based;
589 uint32_t disable_lat;
590 uint32_t disable_clat;
591 uint32_t disable_slat;
592 uint32_t disable_bw;
95820b6e 593 uint32_t unified_rw_rep;
2dc1cbb5
JA
594 uint32_t gtod_reduce;
595 uint32_t gtod_cpu;
12d325ca 596 uint32_t job_start_clock_id;
2dc1cbb5
JA
597 uint32_t clocksource;
598 uint32_t no_stall;
599 uint32_t trim_percentage;
600 uint32_t trim_batch;
601 uint32_t trim_zero;
602 uint64_t trim_backlog;
603 uint32_t clat_percentiles;
56440e63
VF
604 uint32_t lat_percentiles;
605 uint32_t slat_percentiles;
9db01ef9 606 uint32_t percentile_precision;
d252275b 607 uint32_t pad;
2dc1cbb5
JA
608 fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
609
610 uint8_t read_iolog_file[FIO_TOP_STR_MAX];
611 uint8_t write_iolog_file[FIO_TOP_STR_MAX];
b9921d1a 612 uint8_t merge_blktrace_file[FIO_TOP_STR_MAX];
87a48ada 613 fio_fp64_t merge_blktrace_scalars[FIO_IO_U_LIST_MAX_LEN];
55bfd8c8 614 fio_fp64_t merge_blktrace_iters[FIO_IO_U_LIST_MAX_LEN];
dded427c
OS
615
616 uint32_t write_bw_log;
617 uint32_t write_lat_log;
618 uint32_t write_iops_log;
619 uint32_t write_hist_log;
620
2dc1cbb5
JA
621 uint8_t bw_log_file[FIO_TOP_STR_MAX];
622 uint8_t lat_log_file[FIO_TOP_STR_MAX];
623 uint8_t iops_log_file[FIO_TOP_STR_MAX];
68cebb4b 624 uint8_t hist_log_file[FIO_TOP_STR_MAX];
2dc1cbb5
JA
625 uint8_t replay_redirect[FIO_TOP_STR_MAX];
626
627 /*
628 * Pre-run and post-run shell
629 */
630 uint8_t exec_prerun[FIO_TOP_STR_MAX];
631 uint8_t exec_postrun[FIO_TOP_STR_MAX];
632
0d8cc753
CL
633 uint32_t thinkcycles;
634
f7942acd
SK
635 uint32_t thinktime;
636 uint32_t thinktime_spin;
637 uint32_t thinktime_blocks;
638 uint32_t thinktime_blocks_type;
639 uint32_t thinktime_iotime;
640
90eff1c9
SW
641 uint64_t rate[DDIR_RWDIR_CNT];
642 uint64_t ratemin[DDIR_RWDIR_CNT];
2dc1cbb5 643 uint32_t ratecycle;
a9da8ab2 644 uint32_t io_submit_mode;
b999b3c7
JA
645 uint32_t rate_iops[DDIR_RWDIR_CNT];
646 uint32_t rate_iops_min[DDIR_RWDIR_CNT];
6de65959 647 uint32_t rate_process;
1a9bf814 648 uint32_t rate_ign_think;
2dc1cbb5
JA
649
650 uint8_t ioscheduler[FIO_TOP_STR_MAX];
651
2dc1cbb5
JA
652 /*
653 * I/O Error handling
654 */
655 uint32_t continue_on_error;
656
657 /*
658 * Benchmark profile type
659 */
660 uint8_t profile[FIO_TOP_STR_MAX];
661
662 /*
663 * blkio cgroup support
664 */
665 uint8_t cgroup[FIO_TOP_STR_MAX];
666 uint32_t cgroup_weight;
667 uint32_t cgroup_nodelete;
668
669 uint32_t uid;
670 uint32_t gid;
671
0b288ba1 672 uint32_t offset_increment_percent;
8f39afa7 673 uint32_t offset_increment_nz;
6a4cf74f 674 uint64_t offset_increment;
ddf24e42 675 uint64_t number_ios;
6a4cf74f 676
3e260a46
JA
677 uint64_t latency_target;
678 uint64_t latency_window;
f7cf63bf 679 uint64_t max_latency[DDIR_RWDIR_CNT];
e1bcd541 680 uint32_t latency_run;
0d8cc753 681 fio_fp64_t latency_percentile;
66347cfa 682
d4e74fda
DB
683 /*
684 * flow support
685 */
686 int32_t flow_id;
687 uint32_t flow;
688 uint32_t flow_sleep;
689
e883cb35
JF
690 uint32_t sig_figs;
691
66347cfa 692 uint32_t block_error_hist;
0c63576e
JA
693
694 uint32_t replay_align;
695 uint32_t replay_scale;
6dd7fa77 696 uint32_t replay_time_scale;
d7235efb 697 uint32_t replay_skip;
3a5db920
JA
698
699 uint32_t per_job_logs;
2378826d
JA
700
701 uint32_t allow_create;
e81ecca3 702 uint32_t allow_mounted_write;
7b865a2f
BVA
703
704 uint32_t zone_mode;
6df25f78 705 int32_t max_open_zones;
575686bb 706 uint32_t ignore_zone_limits;
03ec570f 707
0a852a50 708 uint32_t log_entries;
03ec570f 709 uint32_t log_prio;
7f812e87 710
a7e8aae0 711 uint32_t fdp;
d3e310c5 712 uint32_t fdp_pli_select;
a7e8aae0
KB
713 uint32_t fdp_plis[FIO_MAX_PLIS];
714 uint32_t fdp_nrpli;
715
b3251e31 716 uint32_t num_range;
7f812e87
LG
717 /*
718 * verify_pattern followed by buffer_pattern from the unpacked struct
719 */
720 uint8_t patterns[];
2dc1cbb5
JA
721} __attribute__((packed));
722
7f812e87
LG
723extern int convert_thread_options_to_cpu(struct thread_options *o,
724 struct thread_options_pack *top, size_t top_sz);
725extern size_t thread_options_pack_size(struct thread_options *o);
2dc1cbb5 726extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *);
51167799 727extern int fio_test_cconv(struct thread_options *);
588b7f09 728extern void options_default_fill(struct thread_options *o);
2dc1cbb5 729
f311f5f3
DLM
730typedef int (split_parse_fn)(struct thread_options *, void *,
731 enum fio_ddir, char *, bool);
732
733extern int str_split_parse(struct thread_data *td, char *str,
734 split_parse_fn *fn, void *eo, bool data);
735
736extern int split_parse_ddir(struct thread_options *o, struct split *split,
737 char *str, bool absolute, unsigned int max_splits);
738
68be9966
NC
739extern int split_parse_prio_ddir(struct thread_options *o,
740 struct split_prio **entries, int *nr_entries,
741 char *str);
742
8062f527 743#endif