Commit | Line | Data |
---|---|---|
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" | |
6 | #include "stat.h" | |
7 | #include "gettime.h" | |
888677a4 | 8 | #include "lib/ieee754.h" |
8062f527 JA |
9 | |
10 | /* | |
11 | * What type of allocation to use for io buffers | |
12 | */ | |
13 | enum fio_memtype { | |
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 */ | |
19 | }; | |
20 | ||
21 | /* | |
22 | * What type of errors to continue on when continue_on_error is used | |
23 | */ | |
24 | enum error_type_bit { | |
25 | ERROR_TYPE_READ_BIT = 0, | |
26 | ERROR_TYPE_WRITE_BIT = 1, | |
27 | ERROR_TYPE_VERIFY_BIT = 2, | |
28 | ERROR_TYPE_CNT = 3, | |
29 | }; | |
30 | ||
31 | #define ERROR_STR_MAX 128 | |
32 | ||
33 | enum error_type { | |
34 | ERROR_TYPE_NONE = 0, | |
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, | |
39 | }; | |
40 | ||
41 | #define BSSPLIT_MAX 64 | |
42 | ||
43 | struct bssplit { | |
44 | uint32_t bs; | |
45 | uint32_t perc; | |
46 | }; | |
47 | ||
48 | struct thread_options { | |
49 | int pad; | |
50 | char *description; | |
51 | char *name; | |
52 | char *directory; | |
53 | char *filename; | |
54 | char *filename_format; | |
55 | char *opendir; | |
56 | char *ioengine; | |
57 | enum td_ddir td_ddir; | |
58 | unsigned int rw_seq; | |
59 | unsigned int kb_base; | |
60 | unsigned int unit_base; | |
61 | unsigned int ddir_seq_nr; | |
62 | long ddir_seq_add; | |
63 | unsigned int iodepth; | |
64 | unsigned int iodepth_low; | |
65 | unsigned int iodepth_batch; | |
66 | unsigned int iodepth_batch_complete; | |
67 | ||
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; | |
74 | ||
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]; | |
81 | ||
82 | int *ignore_error[ERROR_TYPE_CNT]; | |
83 | unsigned int ignore_error_nr[ERROR_TYPE_CNT]; | |
84 | unsigned int error_dump; | |
85 | ||
86 | unsigned int nr_files; | |
87 | unsigned int open_files; | |
88 | enum file_lock_mode file_lock_mode; | |
89 | ||
90 | unsigned int odirect; | |
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; | |
98 | unsigned int sync_io; | |
99 | unsigned int verify; | |
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; | |
114 | unsigned int unlink; | |
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; | |
127 | ||
128 | unsigned int random_distribution; | |
888677a4 JA |
129 | fio_fp64_t zipf_theta; |
130 | fio_fp64_t pareto_h; | |
8062f527 JA |
131 | |
132 | unsigned int random_generator; | |
133 | ||
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; | |
148 | unsigned int loops; | |
149 | unsigned long long zone_range; | |
150 | unsigned long long zone_size; | |
151 | unsigned long long zone_skip; | |
81c6b6cd | 152 | unsigned long long lockmem; |
8062f527 JA |
153 | enum fio_memtype mem_type; |
154 | unsigned int mem_align; | |
155 | ||
156 | unsigned int max_latency; | |
157 | ||
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; | |
172 | #endif | |
173 | unsigned int iolog; | |
174 | unsigned int rwmixcycle; | |
175 | unsigned int rwmix[2]; | |
176 | unsigned int nice; | |
81c6b6cd JA |
177 | unsigned int ioprio; |
178 | unsigned int ioprio_class; | |
8062f527 JA |
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]; | |
206 | ||
207 | char *read_iolog_file; | |
208 | char *write_iolog_file; | |
209 | char *bw_log_file; | |
210 | char *lat_log_file; | |
211 | char *iops_log_file; | |
212 | char *replay_redirect; | |
213 | ||
214 | /* | |
215 | * Pre-run and post-run shell | |
216 | */ | |
217 | char *exec_prerun; | |
218 | char *exec_postrun; | |
219 | ||
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]; | |
225 | ||
226 | char *ioscheduler; | |
227 | ||
228 | /* | |
229 | * CPU "io" cycle burner | |
230 | */ | |
231 | unsigned int cpuload; | |
232 | unsigned int cpucycle; | |
233 | ||
234 | /* | |
235 | * I/O Error handling | |
236 | */ | |
237 | enum error_type continue_on_error; | |
238 | ||
239 | /* | |
240 | * Benchmark profile type | |
241 | */ | |
242 | char *profile; | |
243 | ||
244 | /* | |
245 | * blkio cgroup support | |
246 | */ | |
247 | char *cgroup; | |
248 | unsigned int cgroup_weight; | |
249 | unsigned int cgroup_nodelete; | |
250 | ||
251 | unsigned int uid; | |
252 | unsigned int gid; | |
253 | ||
254 | int flow_id; | |
255 | int flow; | |
256 | int flow_watermark; | |
257 | unsigned int flow_sleep; | |
258 | ||
259 | unsigned long long offset_increment; | |
260 | ||
261 | unsigned int sync_file_range; | |
262 | }; | |
263 | ||
264 | #endif |