1 #ifndef FIO_THREAD_OPTIONS_H
2 #define FIO_THREAD_OPTIONS_H
8 #include "lib/ieee754.h"
11 * What type of allocation to use for io buffers
14 MEM_MALLOC = 0, /* ordinary malloc */
15 MEM_SHM, /* use shared memory segments */
16 MEM_SHMHUGE, /* use shared memory segments with huge pages */
17 MEM_MMAP, /* use anonynomous mmap */
18 MEM_MMAPHUGE, /* memory mapped huge file */
22 * What type of errors to continue on when continue_on_error is used
25 ERROR_TYPE_READ_BIT = 0,
26 ERROR_TYPE_WRITE_BIT = 1,
27 ERROR_TYPE_VERIFY_BIT = 2,
31 #define ERROR_STR_MAX 128
35 ERROR_TYPE_READ = 1 << ERROR_TYPE_READ_BIT,
36 ERROR_TYPE_WRITE = 1 << ERROR_TYPE_WRITE_BIT,
37 ERROR_TYPE_VERIFY = 1 << ERROR_TYPE_VERIFY_BIT,
38 ERROR_TYPE_ANY = 0xffff,
41 #define BSSPLIT_MAX 64
48 struct thread_options {
54 char *filename_format;
60 unsigned int unit_base;
61 unsigned int ddir_seq_nr;
64 unsigned int iodepth_low;
65 unsigned int iodepth_batch;
66 unsigned int iodepth_batch_complete;
68 unsigned long long size;
69 unsigned int size_percent;
70 unsigned int fill_device;
71 unsigned long long file_size_low;
72 unsigned long long file_size_high;
73 unsigned long long start_offset;
75 unsigned int bs[DDIR_RWDIR_CNT];
76 unsigned int ba[DDIR_RWDIR_CNT];
77 unsigned int min_bs[DDIR_RWDIR_CNT];
78 unsigned int max_bs[DDIR_RWDIR_CNT];
79 struct bssplit *bssplit[DDIR_RWDIR_CNT];
80 unsigned int bssplit_nr[DDIR_RWDIR_CNT];
82 int *ignore_error[ERROR_TYPE_CNT];
83 unsigned int ignore_error_nr[ERROR_TYPE_CNT];
84 unsigned int error_dump;
86 unsigned int nr_files;
87 unsigned int open_files;
88 enum file_lock_mode file_lock_mode;
91 unsigned int invalidate_cache;
92 unsigned int create_serialize;
93 unsigned int create_fsync;
94 unsigned int create_on_open;
95 unsigned int create_only;
96 unsigned int end_fsync;
97 unsigned int pre_read;
100 unsigned int do_verify;
101 unsigned int verifysort;
102 unsigned int verifysort_nr;
103 unsigned int verify_interval;
104 unsigned int verify_offset;
105 char verify_pattern[MAX_PATTERN_SIZE];
106 unsigned int verify_pattern_bytes;
107 unsigned int verify_fatal;
108 unsigned int verify_dump;
109 unsigned int verify_async;
110 unsigned long long verify_backlog;
111 unsigned int verify_batch;
112 unsigned int experimental_verify;
113 unsigned int use_thread;
115 unsigned int do_disk_util;
116 unsigned int override_sync;
117 unsigned int rand_repeatable;
118 unsigned int use_os_rand;
119 unsigned int write_lat_log;
120 unsigned int write_bw_log;
121 unsigned int write_iops_log;
122 unsigned int log_avg_msec;
123 unsigned int norandommap;
124 unsigned int softrandommap;
125 unsigned int bs_unaligned;
126 unsigned int fsync_on_close;
128 unsigned int random_distribution;
129 fio_fp64_t zipf_theta;
132 unsigned int random_generator;
134 unsigned int hugepage_size;
135 unsigned int rw_min_bs;
136 unsigned int thinktime;
137 unsigned int thinktime_spin;
138 unsigned int thinktime_blocks;
139 unsigned int fsync_blocks;
140 unsigned int fdatasync_blocks;
141 unsigned int barrier_blocks;
142 unsigned long long start_delay;
143 unsigned long long timeout;
144 unsigned long long ramp_time;
145 unsigned int overwrite;
146 unsigned int bw_avg_time;
147 unsigned int iops_avg_time;
149 unsigned long long zone_range;
150 unsigned long long zone_size;
151 unsigned long long zone_skip;
152 unsigned long long lockmem;
153 enum fio_memtype mem_type;
154 unsigned int mem_align;
156 unsigned int max_latency;
158 unsigned int stonewall;
159 unsigned int new_group;
160 unsigned int numjobs;
161 os_cpu_mask_t cpumask;
162 unsigned int cpumask_set;
163 os_cpu_mask_t verify_cpumask;
164 unsigned int verify_cpumask_set;
165 #ifdef CONFIG_LIBNUMA
166 struct bitmask *numa_cpunodesmask;
167 unsigned int numa_cpumask_set;
168 unsigned short numa_mem_mode;
169 unsigned int numa_mem_prefer_node;
170 struct bitmask *numa_memnodesmask;
171 unsigned int numa_memmask_set;
174 unsigned int rwmixcycle;
175 unsigned int rwmix[2];
178 unsigned int ioprio_class;
179 unsigned int file_service_type;
180 unsigned int group_reporting;
181 unsigned int fadvise_hint;
182 enum fio_fallocate_mode fallocate_mode;
183 unsigned int zero_buffers;
184 unsigned int refill_buffers;
185 unsigned int scramble_buffers;
186 unsigned int compress_percentage;
187 unsigned int compress_chunk;
188 unsigned int time_based;
189 unsigned int disable_lat;
190 unsigned int disable_clat;
191 unsigned int disable_slat;
192 unsigned int disable_bw;
193 unsigned int unified_rw_rep;
194 unsigned int gtod_reduce;
195 unsigned int gtod_cpu;
196 unsigned int gtod_offload;
197 enum fio_cs clocksource;
198 unsigned int no_stall;
199 unsigned int trim_percentage;
200 unsigned int trim_batch;
201 unsigned int trim_zero;
202 unsigned long long trim_backlog;
203 unsigned int clat_percentiles;
204 unsigned int percentile_precision; /* digits after decimal for percentiles */
205 fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
207 char *read_iolog_file;
208 char *write_iolog_file;
212 char *replay_redirect;
215 * Pre-run and post-run shell
220 unsigned int rate[DDIR_RWDIR_CNT];
221 unsigned int ratemin[DDIR_RWDIR_CNT];
222 unsigned int ratecycle;
223 unsigned int rate_iops[DDIR_RWDIR_CNT];
224 unsigned int rate_iops_min[DDIR_RWDIR_CNT];
229 * CPU "io" cycle burner
231 unsigned int cpuload;
232 unsigned int cpucycle;
237 enum error_type continue_on_error;
240 * Benchmark profile type
245 * blkio cgroup support
248 unsigned int cgroup_weight;
249 unsigned int cgroup_nodelete;
257 unsigned int flow_sleep;
259 unsigned long long offset_increment;
261 unsigned int sync_file_range;