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" | |
8 | ||
9 | /* | |
10 | * What type of allocation to use for io buffers | |
11 | */ | |
12 | enum fio_memtype { | |
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 */ | |
18 | }; | |
19 | ||
20 | /* | |
21 | * What type of errors to continue on when continue_on_error is used | |
22 | */ | |
23 | enum error_type_bit { | |
24 | ERROR_TYPE_READ_BIT = 0, | |
25 | ERROR_TYPE_WRITE_BIT = 1, | |
26 | ERROR_TYPE_VERIFY_BIT = 2, | |
27 | ERROR_TYPE_CNT = 3, | |
28 | }; | |
29 | ||
30 | #define ERROR_STR_MAX 128 | |
31 | ||
32 | enum error_type { | |
33 | ERROR_TYPE_NONE = 0, | |
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, | |
38 | }; | |
39 | ||
40 | #define BSSPLIT_MAX 64 | |
41 | ||
42 | struct bssplit { | |
43 | uint32_t bs; | |
44 | uint32_t perc; | |
45 | }; | |
46 | ||
47 | struct thread_options { | |
48 | int pad; | |
49 | char *description; | |
50 | char *name; | |
51 | char *directory; | |
52 | char *filename; | |
53 | char *filename_format; | |
54 | char *opendir; | |
55 | char *ioengine; | |
56 | enum td_ddir td_ddir; | |
57 | unsigned int rw_seq; | |
58 | unsigned int kb_base; | |
59 | unsigned int unit_base; | |
60 | unsigned int ddir_seq_nr; | |
61 | long ddir_seq_add; | |
62 | unsigned int iodepth; | |
63 | unsigned int iodepth_low; | |
64 | unsigned int iodepth_batch; | |
65 | unsigned int iodepth_batch_complete; | |
66 | ||
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; | |
73 | ||
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]; | |
80 | ||
81 | int *ignore_error[ERROR_TYPE_CNT]; | |
82 | unsigned int ignore_error_nr[ERROR_TYPE_CNT]; | |
83 | unsigned int error_dump; | |
84 | ||
85 | unsigned int nr_files; | |
86 | unsigned int open_files; | |
87 | enum file_lock_mode file_lock_mode; | |
88 | ||
89 | unsigned int odirect; | |
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; | |
97 | unsigned int sync_io; | |
98 | unsigned int verify; | |
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; | |
113 | unsigned int unlink; | |
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; | |
126 | ||
127 | unsigned int random_distribution; | |
128 | double zipf_theta; | |
129 | double pareto_h; | |
130 | ||
131 | unsigned int random_generator; | |
132 | ||
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; | |
147 | unsigned int loops; | |
148 | unsigned long long zone_range; | |
149 | unsigned long long zone_size; | |
150 | unsigned long long zone_skip; | |
151 | enum fio_memtype mem_type; | |
152 | unsigned int mem_align; | |
153 | ||
154 | unsigned int max_latency; | |
155 | ||
156 | unsigned int stonewall; | |
157 | unsigned int new_group; | |
158 | unsigned int numjobs; | |
159 | os_cpu_mask_t cpumask; | |
160 | unsigned int cpumask_set; | |
161 | os_cpu_mask_t verify_cpumask; | |
162 | unsigned int verify_cpumask_set; | |
163 | #ifdef CONFIG_LIBNUMA | |
164 | struct bitmask *numa_cpunodesmask; | |
165 | unsigned int numa_cpumask_set; | |
166 | unsigned short numa_mem_mode; | |
167 | unsigned int numa_mem_prefer_node; | |
168 | struct bitmask *numa_memnodesmask; | |
169 | unsigned int numa_memmask_set; | |
170 | #endif | |
171 | unsigned int iolog; | |
172 | unsigned int rwmixcycle; | |
173 | unsigned int rwmix[2]; | |
174 | unsigned int nice; | |
175 | unsigned int file_service_type; | |
176 | unsigned int group_reporting; | |
177 | unsigned int fadvise_hint; | |
178 | enum fio_fallocate_mode fallocate_mode; | |
179 | unsigned int zero_buffers; | |
180 | unsigned int refill_buffers; | |
181 | unsigned int scramble_buffers; | |
182 | unsigned int compress_percentage; | |
183 | unsigned int compress_chunk; | |
184 | unsigned int time_based; | |
185 | unsigned int disable_lat; | |
186 | unsigned int disable_clat; | |
187 | unsigned int disable_slat; | |
188 | unsigned int disable_bw; | |
189 | unsigned int unified_rw_rep; | |
190 | unsigned int gtod_reduce; | |
191 | unsigned int gtod_cpu; | |
192 | unsigned int gtod_offload; | |
193 | enum fio_cs clocksource; | |
194 | unsigned int no_stall; | |
195 | unsigned int trim_percentage; | |
196 | unsigned int trim_batch; | |
197 | unsigned int trim_zero; | |
198 | unsigned long long trim_backlog; | |
199 | unsigned int clat_percentiles; | |
200 | unsigned int percentile_precision; /* digits after decimal for percentiles */ | |
201 | fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN]; | |
202 | ||
203 | char *read_iolog_file; | |
204 | char *write_iolog_file; | |
205 | char *bw_log_file; | |
206 | char *lat_log_file; | |
207 | char *iops_log_file; | |
208 | char *replay_redirect; | |
209 | ||
210 | /* | |
211 | * Pre-run and post-run shell | |
212 | */ | |
213 | char *exec_prerun; | |
214 | char *exec_postrun; | |
215 | ||
216 | unsigned int rate[DDIR_RWDIR_CNT]; | |
217 | unsigned int ratemin[DDIR_RWDIR_CNT]; | |
218 | unsigned int ratecycle; | |
219 | unsigned int rate_iops[DDIR_RWDIR_CNT]; | |
220 | unsigned int rate_iops_min[DDIR_RWDIR_CNT]; | |
221 | ||
222 | char *ioscheduler; | |
223 | ||
224 | /* | |
225 | * CPU "io" cycle burner | |
226 | */ | |
227 | unsigned int cpuload; | |
228 | unsigned int cpucycle; | |
229 | ||
230 | /* | |
231 | * I/O Error handling | |
232 | */ | |
233 | enum error_type continue_on_error; | |
234 | ||
235 | /* | |
236 | * Benchmark profile type | |
237 | */ | |
238 | char *profile; | |
239 | ||
240 | /* | |
241 | * blkio cgroup support | |
242 | */ | |
243 | char *cgroup; | |
244 | unsigned int cgroup_weight; | |
245 | unsigned int cgroup_nodelete; | |
246 | ||
247 | unsigned int uid; | |
248 | unsigned int gid; | |
249 | ||
250 | int flow_id; | |
251 | int flow; | |
252 | int flow_watermark; | |
253 | unsigned int flow_sleep; | |
254 | ||
255 | unsigned long long offset_increment; | |
256 | ||
257 | unsigned int sync_file_range; | |
258 | }; | |
259 | ||
260 | #endif |