Commit | Line | Data |
---|---|---|
ec41265e 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 { | |
24 | ERROR_TYPE_NONE = 0, | |
25 | ERROR_TYPE_READ = 1 << 0, | |
26 | ERROR_TYPE_WRITE = 1 << 1, | |
27 | ERROR_TYPE_VERIFY = 1 << 2, | |
28 | ERROR_TYPE_ANY = 0xffff, | |
29 | }; | |
30 | ||
31 | struct bssplit { | |
32 | unsigned int bs; | |
33 | unsigned char perc; | |
34 | }; | |
35 | ||
36 | struct thread_options { | |
37 | int pad; | |
38 | char *description; | |
39 | char *name; | |
40 | char *directory; | |
41 | char *filename; | |
42 | char *opendir; | |
43 | char *ioengine; | |
44 | enum td_ddir td_ddir; | |
45 | unsigned int rw_seq; | |
46 | unsigned int kb_base; | |
47 | unsigned int ddir_seq_nr; | |
48 | long ddir_seq_add; | |
49 | unsigned int iodepth; | |
50 | unsigned int iodepth_low; | |
51 | unsigned int iodepth_batch; | |
52 | unsigned int iodepth_batch_complete; | |
53 | ||
54 | unsigned long long size; | |
55 | unsigned int size_percent; | |
56 | unsigned int fill_device; | |
57 | unsigned long long file_size_low; | |
58 | unsigned long long file_size_high; | |
59 | unsigned long long start_offset; | |
60 | ||
61 | unsigned int bs[2]; | |
62 | unsigned int ba[2]; | |
63 | unsigned int min_bs[2]; | |
64 | unsigned int max_bs[2]; | |
65 | struct bssplit *bssplit[2]; | |
66 | unsigned int bssplit_nr[2]; | |
67 | ||
68 | unsigned int nr_files; | |
69 | unsigned int open_files; | |
70 | enum file_lock_mode file_lock_mode; | |
71 | unsigned int lockfile_batch; | |
72 | ||
73 | unsigned int odirect; | |
74 | unsigned int invalidate_cache; | |
75 | unsigned int create_serialize; | |
76 | unsigned int create_fsync; | |
77 | unsigned int create_on_open; | |
78 | unsigned int end_fsync; | |
79 | unsigned int pre_read; | |
80 | unsigned int sync_io; | |
81 | unsigned int verify; | |
82 | unsigned int do_verify; | |
83 | unsigned int verifysort; | |
84 | unsigned int verify_interval; | |
85 | unsigned int verify_offset; | |
86 | char verify_pattern[MAX_PATTERN_SIZE]; | |
87 | unsigned int verify_pattern_bytes; | |
88 | unsigned int verify_fatal; | |
89 | unsigned int verify_dump; | |
90 | unsigned int verify_async; | |
91 | unsigned long long verify_backlog; | |
92 | unsigned int verify_batch; | |
93 | unsigned int use_thread; | |
94 | unsigned int unlink; | |
95 | unsigned int do_disk_util; | |
96 | unsigned int override_sync; | |
97 | unsigned int rand_repeatable; | |
98 | unsigned int use_os_rand; | |
99 | unsigned int write_lat_log; | |
100 | unsigned int write_bw_log; | |
101 | unsigned int write_iops_log; | |
102 | unsigned int log_avg_msec; | |
103 | unsigned int norandommap; | |
104 | unsigned int softrandommap; | |
105 | unsigned int bs_unaligned; | |
106 | unsigned int fsync_on_close; | |
107 | ||
108 | unsigned int hugepage_size; | |
109 | unsigned int rw_min_bs; | |
110 | unsigned int thinktime; | |
111 | unsigned int thinktime_spin; | |
112 | unsigned int thinktime_blocks; | |
113 | unsigned int fsync_blocks; | |
114 | unsigned int fdatasync_blocks; | |
115 | unsigned int barrier_blocks; | |
116 | unsigned long long start_delay; | |
117 | unsigned long long timeout; | |
118 | unsigned long long ramp_time; | |
119 | unsigned int overwrite; | |
120 | unsigned int bw_avg_time; | |
121 | unsigned int iops_avg_time; | |
122 | unsigned int loops; | |
123 | unsigned long long zone_range; | |
124 | unsigned long long zone_size; | |
125 | unsigned long long zone_skip; | |
126 | enum fio_memtype mem_type; | |
127 | unsigned int mem_align; | |
128 | ||
129 | unsigned int stonewall; | |
130 | unsigned int new_group; | |
131 | unsigned int numjobs; | |
132 | os_cpu_mask_t cpumask; | |
133 | unsigned int cpumask_set; | |
134 | os_cpu_mask_t verify_cpumask; | |
135 | unsigned int verify_cpumask_set; | |
136 | unsigned int iolog; | |
137 | unsigned int rwmixcycle; | |
138 | unsigned int rwmix[2]; | |
139 | unsigned int nice; | |
140 | unsigned int file_service_type; | |
141 | unsigned int group_reporting; | |
142 | unsigned int fadvise_hint; | |
143 | enum fio_fallocate_mode fallocate_mode; | |
144 | unsigned int zero_buffers; | |
145 | unsigned int refill_buffers; | |
146 | unsigned int scramble_buffers; | |
147 | unsigned int time_based; | |
148 | unsigned int disable_lat; | |
149 | unsigned int disable_clat; | |
150 | unsigned int disable_slat; | |
151 | unsigned int disable_bw; | |
152 | unsigned int gtod_reduce; | |
153 | unsigned int gtod_cpu; | |
154 | unsigned int gtod_offload; | |
155 | enum fio_cs clocksource; | |
156 | unsigned int no_stall; | |
157 | unsigned int trim_percentage; | |
158 | unsigned int trim_batch; | |
159 | unsigned int trim_zero; | |
160 | unsigned long long trim_backlog; | |
161 | unsigned int clat_percentiles; | |
162 | unsigned int overwrite_plist; | |
163 | fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN]; | |
164 | ||
165 | char *read_iolog_file; | |
166 | char *write_iolog_file; | |
167 | char *bw_log_file; | |
168 | char *lat_log_file; | |
169 | char *iops_log_file; | |
170 | char *replay_redirect; | |
171 | ||
172 | /* | |
173 | * Pre-run and post-run shell | |
174 | */ | |
175 | char *exec_prerun; | |
176 | char *exec_postrun; | |
177 | ||
178 | unsigned int rate[2]; | |
179 | unsigned int ratemin[2]; | |
180 | unsigned int ratecycle; | |
181 | unsigned int rate_iops[2]; | |
182 | unsigned int rate_iops_min[2]; | |
183 | ||
184 | char *ioscheduler; | |
185 | ||
186 | /* | |
187 | * CPU "io" cycle burner | |
188 | */ | |
189 | unsigned int cpuload; | |
190 | unsigned int cpucycle; | |
191 | ||
192 | /* | |
193 | * I/O Error handling | |
194 | */ | |
195 | enum error_type continue_on_error; | |
196 | ||
197 | /* | |
198 | * Benchmark profile type | |
199 | */ | |
200 | char *profile; | |
201 | ||
202 | /* | |
203 | * blkio cgroup support | |
204 | */ | |
205 | char *cgroup; | |
206 | unsigned int cgroup_weight; | |
207 | unsigned int cgroup_nodelete; | |
208 | ||
209 | unsigned int uid; | |
210 | unsigned int gid; | |
211 | ||
212 | int flow_id; | |
213 | int flow; | |
214 | int flow_watermark; | |
215 | unsigned int flow_sleep; | |
216 | ||
217 | unsigned int sync_file_range; | |
218 | }; | |
219 | ||
220 | #endif |