Fio 3.34
[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;
56e2a5fc 165 unsigned int allrand_repeatable;
363cffa7 166 unsigned long long rand_seed;
8062f527 167 unsigned int log_avg_msec;
1e613c9c
KC
168 unsigned int log_hist_msec;
169 unsigned int log_hist_coarseness;
e6989e10 170 unsigned int log_max;
ae588852 171 unsigned int log_offset;
aee2ab67 172 unsigned int log_gz;
b26317c9 173 unsigned int log_gz_store;
3aea75b1 174 unsigned int log_unix_epoch;
d5b3cfd4 175 unsigned int log_alternate_epoch;
176 unsigned int log_alternate_epoch_clock_id;
8062f527
JA
177 unsigned int norandommap;
178 unsigned int softrandommap;
179 unsigned int bs_unaligned;
180 unsigned int fsync_on_close;
6aca9b3d 181 unsigned int bs_is_seq_rand;
8062f527 182
62167762
JC
183 unsigned int verify_only;
184
8062f527 185 unsigned int random_distribution;
f9cafb12 186 unsigned int exitall_error;
b7f487cf 187
e0a04ac1
JA
188 struct zone_split *zone_split[DDIR_RWDIR_CNT];
189 unsigned int zone_split_nr[DDIR_RWDIR_CNT];
190
888677a4
JA
191 fio_fp64_t zipf_theta;
192 fio_fp64_t pareto_h;
f88cd222 193 fio_fp64_t gauss_dev;
a87c90fd 194 fio_fp64_t random_center;
8062f527
JA
195
196 unsigned int random_generator;
197
d9472271 198 unsigned int perc_rand[DDIR_RWDIR_CNT];
211c9b89 199
8062f527 200 unsigned int hugepage_size;
5fff9543 201 unsigned long long rw_min_bs;
8062f527
JA
202 unsigned int fsync_blocks;
203 unsigned int fdatasync_blocks;
204 unsigned int barrier_blocks;
205 unsigned long long start_delay;
49050b56 206 unsigned long long start_delay_orig;
23ed19b0 207 unsigned long long start_delay_high;
8062f527
JA
208 unsigned long long timeout;
209 unsigned long long ramp_time;
2c5d94bc 210 unsigned int ss_state;
16e56d25
VF
211 fio_fp64_t ss_limit;
212 unsigned long long ss_dur;
213 unsigned long long ss_ramp_time;
8062f527
JA
214 unsigned int overwrite;
215 unsigned int bw_avg_time;
216 unsigned int iops_avg_time;
217 unsigned int loops;
218 unsigned long long zone_range;
219 unsigned long long zone_size;
b8dd9750 220 unsigned long long zone_capacity;
8062f527 221 unsigned long long zone_skip;
8f39afa7 222 uint32_t zone_skip_nz;
7b865a2f 223 enum fio_zone_mode zone_mode;
81c6b6cd 224 unsigned long long lockmem;
8062f527
JA
225 enum fio_memtype mem_type;
226 unsigned int mem_align;
227
f7cf63bf 228 unsigned long long max_latency[DDIR_RWDIR_CNT];
8062f527 229
fd56c235
AW
230 unsigned int exit_what;
231 unsigned int stonewall;
8062f527
JA
232 unsigned int new_group;
233 unsigned int numjobs;
234 os_cpu_mask_t cpumask;
8062f527 235 os_cpu_mask_t verify_cpumask;
c08f9fe2 236 os_cpu_mask_t log_gz_cpumask;
c2acfbac 237 unsigned int cpus_allowed_policy;
43522848 238 char *numa_cpunodes;
8062f527
JA
239 unsigned short numa_mem_mode;
240 unsigned int numa_mem_prefer_node;
43522848 241 char *numa_memnodes;
03553853 242 unsigned int gpu_dev_id;
89978a6b 243 unsigned int start_offset_percent;
03553853 244
8062f527
JA
245 unsigned int iolog;
246 unsigned int rwmixcycle;
5054e67c 247 unsigned int rwmix[DDIR_RWDIR_CNT];
8062f527 248 unsigned int nice;
81c6b6cd
JA
249 unsigned int ioprio;
250 unsigned int ioprio_class;
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;
8062f527
JA
275 enum fio_cs clocksource;
276 unsigned int no_stall;
277 unsigned int trim_percentage;
278 unsigned int trim_batch;
279 unsigned int trim_zero;
280 unsigned long long trim_backlog;
281 unsigned int clat_percentiles;
56440e63 282 unsigned int slat_percentiles;
b599759b 283 unsigned int lat_percentiles;
8062f527
JA
284 unsigned int percentile_precision; /* digits after decimal for percentiles */
285 fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
286
287 char *read_iolog_file;
98e7161c 288 bool read_iolog_chunked;
8062f527 289 char *write_iolog_file;
b9921d1a 290 char *merge_blktrace_file;
87a48ada 291 fio_fp64_t merge_blktrace_scalars[FIO_IO_U_LIST_MAX_LEN];
55bfd8c8 292 fio_fp64_t merge_blktrace_iters[FIO_IO_U_LIST_MAX_LEN];
dded427c
OS
293
294 unsigned int write_bw_log;
295 unsigned int write_lat_log;
296 unsigned int write_iops_log;
297 unsigned int write_hist_log;
298
8062f527
JA
299 char *bw_log_file;
300 char *lat_log_file;
301 char *iops_log_file;
1e613c9c 302 char *hist_log_file;
8062f527
JA
303 char *replay_redirect;
304
305 /*
306 * Pre-run and post-run shell
307 */
308 char *exec_prerun;
309 char *exec_postrun;
310
f7942acd
SK
311 unsigned int thinktime;
312 unsigned int thinktime_spin;
313 unsigned int thinktime_blocks;
314 unsigned int thinktime_blocks_type;
315 unsigned int thinktime_iotime;
316
90eff1c9
SW
317 uint64_t rate[DDIR_RWDIR_CNT];
318 uint64_t ratemin[DDIR_RWDIR_CNT];
8062f527 319 unsigned int ratecycle;
a9da8ab2 320 unsigned int io_submit_mode;
8062f527
JA
321 unsigned int rate_iops[DDIR_RWDIR_CNT];
322 unsigned int rate_iops_min[DDIR_RWDIR_CNT];
6de65959 323 unsigned int rate_process;
1a9bf814 324 unsigned int rate_ign_think;
8062f527
JA
325
326 char *ioscheduler;
327
8062f527
JA
328 /*
329 * I/O Error handling
330 */
331 enum error_type continue_on_error;
332
333 /*
334 * Benchmark profile type
335 */
336 char *profile;
337
338 /*
339 * blkio cgroup support
340 */
341 char *cgroup;
342 unsigned int cgroup_weight;
343 unsigned int cgroup_nodelete;
344
345 unsigned int uid;
346 unsigned int gid;
347
0b288ba1 348 unsigned int offset_increment_percent;
8f39afa7 349 unsigned int offset_increment_nz;
8062f527 350 unsigned long long offset_increment;
ddf24e42 351 unsigned long long number_ios;
8062f527
JA
352
353 unsigned int sync_file_range;
3e260a46
JA
354
355 unsigned long long latency_target;
356 unsigned long long latency_window;
357 fio_fp64_t latency_percentile;
e1bcd541 358 uint32_t latency_run;
66347cfa 359
d4e74fda
DB
360 /*
361 * flow support
362 */
363 int flow_id;
364 unsigned int flow;
365 unsigned int flow_sleep;
366
e883cb35
JF
367 unsigned int sig_figs;
368
66347cfa 369 unsigned block_error_hist;
0c63576e
JA
370
371 unsigned int replay_align;
372 unsigned int replay_scale;
6dd7fa77 373 unsigned int replay_time_scale;
d7235efb 374 unsigned int replay_skip;
3a5db920
JA
375
376 unsigned int per_job_logs;
2378826d
JA
377
378 unsigned int allow_create;
e81ecca3 379 unsigned int allow_mounted_write;
bfbdd35b
BVA
380
381 /* Parameters that affect zonemode=zbd */
382 unsigned int read_beyond_wp;
59b07544 383 int max_open_zones;
219c662d 384 unsigned int job_max_open_zones;
575686bb 385 unsigned int ignore_zone_limits;
a7c2b6fc
BVA
386 fio_fp64_t zrt;
387 fio_fp64_t zrf;
03ec570f 388
a7e8aae0
KB
389#define FIO_MAX_PLIS 16
390 unsigned int fdp;
391 unsigned int fdp_plis[FIO_MAX_PLIS];
392 unsigned int fdp_nrpli;
393
0a852a50 394 unsigned int log_entries;
03ec570f 395 unsigned int log_prio;
8062f527
JA
396};
397
2dc1cbb5
JA
398#define FIO_TOP_STR_MAX 256
399
400struct thread_options_pack {
a8523a6a 401 uint64_t set_options[NR_OPTS_SZ];
2dc1cbb5
JA
402 uint8_t description[FIO_TOP_STR_MAX];
403 uint8_t name[FIO_TOP_STR_MAX];
9cc8cb91 404 uint8_t wait_for[FIO_TOP_STR_MAX];
2dc1cbb5
JA
405 uint8_t directory[FIO_TOP_STR_MAX];
406 uint8_t filename[FIO_TOP_STR_MAX];
22f80458 407 uint8_t filename_format[FIO_TOP_STR_MAX];
2dc1cbb5
JA
408 uint8_t opendir[FIO_TOP_STR_MAX];
409 uint8_t ioengine[FIO_TOP_STR_MAX];
83ea422a 410 uint8_t mmapfile[FIO_TOP_STR_MAX];
2dc1cbb5
JA
411 uint32_t td_ddir;
412 uint32_t rw_seq;
413 uint32_t kb_base;
22f80458 414 uint32_t unit_base;
2dc1cbb5
JA
415 uint32_t ddir_seq_nr;
416 uint64_t ddir_seq_add;
417 uint32_t iodepth;
418 uint32_t iodepth_low;
419 uint32_t iodepth_batch;
82407585
RP
420 uint32_t iodepth_batch_complete_min;
421 uint32_t iodepth_batch_complete_max;
997b5680 422 uint32_t serialize_overlap;
56440e63 423 uint32_t pad;
2dc1cbb5
JA
424
425 uint64_t size;
5be9bf09 426 uint64_t io_size;
2dc1cbb5 427 uint32_t size_percent;
8f39afa7 428 uint32_t size_nz;
8b38f401 429 uint32_t io_size_percent;
8f39afa7 430 uint32_t io_size_nz;
2dc1cbb5 431 uint32_t fill_device;
bedc9dc2 432 uint32_t file_append;
922a5be8 433 uint32_t unique_filename;
8f39afa7 434 uint32_t pad3;
2dc1cbb5
JA
435 uint64_t file_size_low;
436 uint64_t file_size_high;
437 uint64_t start_offset;
83c8b093 438 uint64_t start_offset_align;
8f39afa7
AD
439 uint32_t start_offset_nz;
440 uint32_t pad4;
2dc1cbb5 441
5fff9543
JF
442 uint64_t bs[DDIR_RWDIR_CNT];
443 uint64_t ba[DDIR_RWDIR_CNT];
444 uint64_t min_bs[DDIR_RWDIR_CNT];
445 uint64_t max_bs[DDIR_RWDIR_CNT];
b999b3c7
JA
446 struct bssplit bssplit[DDIR_RWDIR_CNT][BSSPLIT_MAX];
447 uint32_t bssplit_nr[DDIR_RWDIR_CNT];
2dc1cbb5 448
e65a950a
JA
449 uint32_t ignore_error[ERROR_TYPE_CNT][ERROR_STR_MAX];
450 uint32_t ignore_error_nr[ERROR_TYPE_CNT];
451 uint32_t error_dump;
452
2dc1cbb5
JA
453 uint32_t nr_files;
454 uint32_t open_files;
455 uint32_t file_lock_mode;
2dc1cbb5
JA
456
457 uint32_t odirect;
d01612f3 458 uint32_t oatomic;
2dc1cbb5
JA
459 uint32_t invalidate_cache;
460 uint32_t create_serialize;
461 uint32_t create_fsync;
462 uint32_t create_on_open;
fb390e24 463 uint32_t create_only;
2dc1cbb5
JA
464 uint32_t end_fsync;
465 uint32_t pre_read;
466 uint32_t sync_io;
ae8e559e 467 uint32_t write_hint;
2dc1cbb5
JA
468 uint32_t verify;
469 uint32_t do_verify;
2dc1cbb5
JA
470 uint32_t verify_interval;
471 uint32_t verify_offset;
2dc1cbb5
JA
472 uint32_t verify_pattern_bytes;
473 uint32_t verify_fatal;
474 uint32_t verify_dump;
475 uint32_t verify_async;
476 uint64_t verify_backlog;
477 uint32_t verify_batch;
836fcc0f 478 uint32_t experimental_verify;
ca09be4b
JA
479 uint32_t verify_state;
480 uint32_t verify_state_save;
2dc1cbb5
JA
481 uint32_t use_thread;
482 uint32_t unlink;
39c1c323 483 uint32_t unlink_each_loop;
2dc1cbb5
JA
484 uint32_t do_disk_util;
485 uint32_t override_sync;
486 uint32_t rand_repeatable;
56e2a5fc 487 uint32_t allrand_repeatable;
56440e63 488 uint32_t pad2;
363cffa7 489 uint64_t rand_seed;
2dc1cbb5 490 uint32_t log_avg_msec;
1e613c9c
KC
491 uint32_t log_hist_msec;
492 uint32_t log_hist_coarseness;
e6989e10 493 uint32_t log_max;
ae588852 494 uint32_t log_offset;
aee2ab67 495 uint32_t log_gz;
b26317c9 496 uint32_t log_gz_store;
3aea75b1 497 uint32_t log_unix_epoch;
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;
2dc1cbb5
JA
536 uint32_t overwrite;
537 uint32_t bw_avg_time;
538 uint32_t iops_avg_time;
539 uint32_t loops;
540 uint64_t zone_range;
541 uint64_t zone_size;
b8dd9750 542 uint64_t zone_capacity;
2dc1cbb5 543 uint64_t zone_skip;
ae278f9a 544 uint64_t lockmem;
8f39afa7 545 uint32_t zone_skip_nz;
2dc1cbb5
JA
546 uint32_t mem_type;
547 uint32_t mem_align;
548
fd56c235
AW
549 uint32_t exit_what;
550 uint32_t stonewall;
2dc1cbb5
JA
551 uint32_t new_group;
552 uint32_t numjobs;
33f42c20 553
57535f41
JA
554 /*
555 * We currently can't convert these, so don't enable them
556 */
557#if 0
2dc1cbb5 558 uint8_t cpumask[FIO_TOP_STR_MAX];
2dc1cbb5 559 uint8_t verify_cpumask[FIO_TOP_STR_MAX];
c08f9fe2 560 uint8_t log_gz_cpumask[FIO_TOP_STR_MAX];
57535f41 561#endif
6599ce5a 562 uint32_t gpu_dev_id;
89978a6b 563 uint32_t start_offset_percent;
c2acfbac 564 uint32_t cpus_allowed_policy;
2dc1cbb5
JA
565 uint32_t iolog;
566 uint32_t rwmixcycle;
5054e67c 567 uint32_t rwmix[DDIR_RWDIR_CNT];
2dc1cbb5 568 uint32_t nice;
28727df7
JA
569 uint32_t ioprio;
570 uint32_t ioprio_class;
2dc1cbb5
JA
571 uint32_t file_service_type;
572 uint32_t group_reporting;
8243be59 573 uint32_t stats;
2dc1cbb5
JA
574 uint32_t fadvise_hint;
575 uint32_t fallocate_mode;
576 uint32_t zero_buffers;
577 uint32_t refill_buffers;
578 uint32_t scramble_buffers;
ce35b1ec 579 uint32_t buffer_pattern_bytes;
5c94b008
JA
580 uint32_t compress_percentage;
581 uint32_t compress_chunk;
582 uint32_t dedupe_percentage;
0d71aa98
BD
583 uint32_t dedupe_mode;
584 uint32_t dedupe_working_set_percentage;
c49cfc76 585 uint32_t dedupe_global;
2dc1cbb5
JA
586 uint32_t time_based;
587 uint32_t disable_lat;
588 uint32_t disable_clat;
589 uint32_t disable_slat;
590 uint32_t disable_bw;
95820b6e 591 uint32_t unified_rw_rep;
2dc1cbb5
JA
592 uint32_t gtod_reduce;
593 uint32_t gtod_cpu;
2dc1cbb5
JA
594 uint32_t clocksource;
595 uint32_t no_stall;
596 uint32_t trim_percentage;
597 uint32_t trim_batch;
598 uint32_t trim_zero;
599 uint64_t trim_backlog;
600 uint32_t clat_percentiles;
56440e63
VF
601 uint32_t lat_percentiles;
602 uint32_t slat_percentiles;
9db01ef9 603 uint32_t percentile_precision;
c49cfc76 604 uint32_t pad5;
2dc1cbb5
JA
605 fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
606
607 uint8_t read_iolog_file[FIO_TOP_STR_MAX];
608 uint8_t write_iolog_file[FIO_TOP_STR_MAX];
b9921d1a 609 uint8_t merge_blktrace_file[FIO_TOP_STR_MAX];
87a48ada 610 fio_fp64_t merge_blktrace_scalars[FIO_IO_U_LIST_MAX_LEN];
55bfd8c8 611 fio_fp64_t merge_blktrace_iters[FIO_IO_U_LIST_MAX_LEN];
dded427c
OS
612
613 uint32_t write_bw_log;
614 uint32_t write_lat_log;
615 uint32_t write_iops_log;
616 uint32_t write_hist_log;
617
2dc1cbb5
JA
618 uint8_t bw_log_file[FIO_TOP_STR_MAX];
619 uint8_t lat_log_file[FIO_TOP_STR_MAX];
620 uint8_t iops_log_file[FIO_TOP_STR_MAX];
68cebb4b 621 uint8_t hist_log_file[FIO_TOP_STR_MAX];
2dc1cbb5
JA
622 uint8_t replay_redirect[FIO_TOP_STR_MAX];
623
624 /*
625 * Pre-run and post-run shell
626 */
627 uint8_t exec_prerun[FIO_TOP_STR_MAX];
628 uint8_t exec_postrun[FIO_TOP_STR_MAX];
629
f7942acd
SK
630 uint32_t thinktime;
631 uint32_t thinktime_spin;
632 uint32_t thinktime_blocks;
633 uint32_t thinktime_blocks_type;
634 uint32_t thinktime_iotime;
635
90eff1c9
SW
636 uint64_t rate[DDIR_RWDIR_CNT];
637 uint64_t ratemin[DDIR_RWDIR_CNT];
2dc1cbb5 638 uint32_t ratecycle;
a9da8ab2 639 uint32_t io_submit_mode;
b999b3c7
JA
640 uint32_t rate_iops[DDIR_RWDIR_CNT];
641 uint32_t rate_iops_min[DDIR_RWDIR_CNT];
6de65959 642 uint32_t rate_process;
1a9bf814 643 uint32_t rate_ign_think;
2dc1cbb5
JA
644
645 uint8_t ioscheduler[FIO_TOP_STR_MAX];
646
2dc1cbb5
JA
647 /*
648 * I/O Error handling
649 */
650 uint32_t continue_on_error;
651
652 /*
653 * Benchmark profile type
654 */
655 uint8_t profile[FIO_TOP_STR_MAX];
656
657 /*
658 * blkio cgroup support
659 */
660 uint8_t cgroup[FIO_TOP_STR_MAX];
661 uint32_t cgroup_weight;
662 uint32_t cgroup_nodelete;
663
664 uint32_t uid;
665 uint32_t gid;
666
0b288ba1 667 uint32_t offset_increment_percent;
8f39afa7 668 uint32_t offset_increment_nz;
6a4cf74f 669 uint64_t offset_increment;
ddf24e42 670 uint64_t number_ios;
6a4cf74f 671
3e260a46
JA
672 uint64_t latency_target;
673 uint64_t latency_window;
f7cf63bf 674 uint64_t max_latency[DDIR_RWDIR_CNT];
3e260a46 675 fio_fp64_t latency_percentile;
e1bcd541 676 uint32_t latency_run;
66347cfa 677
d4e74fda
DB
678 /*
679 * flow support
680 */
681 int32_t flow_id;
682 uint32_t flow;
683 uint32_t flow_sleep;
684
e883cb35
JF
685 uint32_t sig_figs;
686
66347cfa 687 uint32_t block_error_hist;
0c63576e
JA
688
689 uint32_t replay_align;
690 uint32_t replay_scale;
6dd7fa77 691 uint32_t replay_time_scale;
d7235efb 692 uint32_t replay_skip;
3a5db920
JA
693
694 uint32_t per_job_logs;
2378826d
JA
695
696 uint32_t allow_create;
e81ecca3 697 uint32_t allow_mounted_write;
7b865a2f
BVA
698
699 uint32_t zone_mode;
6df25f78 700 int32_t max_open_zones;
575686bb 701 uint32_t ignore_zone_limits;
03ec570f 702
0a852a50 703 uint32_t log_entries;
03ec570f 704 uint32_t log_prio;
7f812e87 705
a7e8aae0
KB
706 uint32_t fdp;
707 uint32_t fdp_plis[FIO_MAX_PLIS];
708 uint32_t fdp_nrpli;
709
7f812e87
LG
710 /*
711 * verify_pattern followed by buffer_pattern from the unpacked struct
712 */
713 uint8_t patterns[];
2dc1cbb5
JA
714} __attribute__((packed));
715
7f812e87
LG
716extern int convert_thread_options_to_cpu(struct thread_options *o,
717 struct thread_options_pack *top, size_t top_sz);
718extern size_t thread_options_pack_size(struct thread_options *o);
2dc1cbb5 719extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *);
51167799 720extern int fio_test_cconv(struct thread_options *);
588b7f09 721extern void options_default_fill(struct thread_options *o);
2dc1cbb5 722
f311f5f3
DLM
723typedef int (split_parse_fn)(struct thread_options *, void *,
724 enum fio_ddir, char *, bool);
725
726extern int str_split_parse(struct thread_data *td, char *str,
727 split_parse_fn *fn, void *eo, bool data);
728
729extern int split_parse_ddir(struct thread_options *o, struct split *split,
730 char *str, bool absolute, unsigned int max_splits);
731
68be9966
NC
732extern int split_parse_prio_ddir(struct thread_options *o,
733 struct split_prio **entries, int *nr_entries,
734 char *str);
735
8062f527 736#endif