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