Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 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" |
Jens Axboe | 888677a | 2013-04-10 22:19:46 +0200 | [diff] [blame] | 8 | #include "lib/ieee754.h" |
Jens Axboe | 3c97812 | 2013-04-17 19:27:46 +0200 | [diff] [blame] | 9 | #include "td_error.h" |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 10 | |
| 11 | /* |
| 12 | * What type of allocation to use for io buffers |
| 13 | */ |
| 14 | enum fio_memtype { |
| 15 | MEM_MALLOC = 0, /* ordinary malloc */ |
| 16 | MEM_SHM, /* use shared memory segments */ |
| 17 | MEM_SHMHUGE, /* use shared memory segments with huge pages */ |
| 18 | MEM_MMAP, /* use anonynomous mmap */ |
| 19 | MEM_MMAPHUGE, /* memory mapped huge file */ |
| 20 | }; |
| 21 | |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 22 | #define ERROR_STR_MAX 128 |
| 23 | |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 24 | #define BSSPLIT_MAX 64 |
| 25 | |
| 26 | struct bssplit { |
| 27 | uint32_t bs; |
| 28 | uint32_t perc; |
| 29 | }; |
| 30 | |
| 31 | struct thread_options { |
| 32 | int pad; |
| 33 | char *description; |
| 34 | char *name; |
| 35 | char *directory; |
| 36 | char *filename; |
| 37 | char *filename_format; |
| 38 | char *opendir; |
| 39 | char *ioengine; |
Jens Axboe | 83ea422 | 2012-03-28 14:01:46 +0200 | [diff] [blame] | 40 | char *mmapfile; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 41 | enum td_ddir td_ddir; |
| 42 | unsigned int rw_seq; |
| 43 | unsigned int kb_base; |
| 44 | unsigned int unit_base; |
| 45 | unsigned int ddir_seq_nr; |
| 46 | long ddir_seq_add; |
| 47 | unsigned int iodepth; |
| 48 | unsigned int iodepth_low; |
| 49 | unsigned int iodepth_batch; |
| 50 | unsigned int iodepth_batch_complete; |
| 51 | |
| 52 | unsigned long long size; |
| 53 | unsigned int size_percent; |
| 54 | unsigned int fill_device; |
| 55 | unsigned long long file_size_low; |
| 56 | unsigned long long file_size_high; |
| 57 | unsigned long long start_offset; |
| 58 | |
| 59 | unsigned int bs[DDIR_RWDIR_CNT]; |
| 60 | unsigned int ba[DDIR_RWDIR_CNT]; |
| 61 | unsigned int min_bs[DDIR_RWDIR_CNT]; |
| 62 | unsigned int max_bs[DDIR_RWDIR_CNT]; |
| 63 | struct bssplit *bssplit[DDIR_RWDIR_CNT]; |
| 64 | unsigned int bssplit_nr[DDIR_RWDIR_CNT]; |
| 65 | |
| 66 | int *ignore_error[ERROR_TYPE_CNT]; |
| 67 | unsigned int ignore_error_nr[ERROR_TYPE_CNT]; |
| 68 | unsigned int error_dump; |
| 69 | |
| 70 | unsigned int nr_files; |
| 71 | unsigned int open_files; |
| 72 | enum file_lock_mode file_lock_mode; |
| 73 | |
| 74 | unsigned int odirect; |
Chris Mason | d01612f | 2013-11-15 15:52:58 -0700 | [diff] [blame] | 75 | unsigned int oatomic; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 76 | unsigned int invalidate_cache; |
| 77 | unsigned int create_serialize; |
| 78 | unsigned int create_fsync; |
| 79 | unsigned int create_on_open; |
| 80 | unsigned int create_only; |
| 81 | unsigned int end_fsync; |
| 82 | unsigned int pre_read; |
| 83 | unsigned int sync_io; |
| 84 | unsigned int verify; |
| 85 | unsigned int do_verify; |
| 86 | unsigned int verifysort; |
| 87 | unsigned int verifysort_nr; |
| 88 | unsigned int verify_interval; |
| 89 | unsigned int verify_offset; |
| 90 | char verify_pattern[MAX_PATTERN_SIZE]; |
| 91 | unsigned int verify_pattern_bytes; |
| 92 | unsigned int verify_fatal; |
| 93 | unsigned int verify_dump; |
| 94 | unsigned int verify_async; |
| 95 | unsigned long long verify_backlog; |
| 96 | unsigned int verify_batch; |
| 97 | unsigned int experimental_verify; |
| 98 | unsigned int use_thread; |
| 99 | unsigned int unlink; |
| 100 | unsigned int do_disk_util; |
| 101 | unsigned int override_sync; |
| 102 | unsigned int rand_repeatable; |
Christian Ehrhardt | 56e2a5f | 2014-02-20 09:10:17 -0800 | [diff] [blame] | 103 | unsigned int allrand_repeatable; |
Grant Grundler | 363cffa | 2014-01-28 15:11:23 -0700 | [diff] [blame] | 104 | unsigned long long rand_seed; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 105 | unsigned int use_os_rand; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 106 | unsigned int log_avg_msec; |
| 107 | unsigned int norandommap; |
| 108 | unsigned int softrandommap; |
| 109 | unsigned int bs_unaligned; |
| 110 | unsigned int fsync_on_close; |
Jens Axboe | 6aca9b3 | 2013-07-25 12:45:26 -0600 | [diff] [blame] | 111 | unsigned int bs_is_seq_rand; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 112 | |
Juan Casse | 6216776 | 2013-09-17 14:06:13 -0700 | [diff] [blame] | 113 | unsigned int verify_only; |
| 114 | |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 115 | unsigned int random_distribution; |
Jens Axboe | b7f487c | 2013-04-10 19:50:32 +0200 | [diff] [blame] | 116 | |
Jens Axboe | 888677a | 2013-04-10 22:19:46 +0200 | [diff] [blame] | 117 | fio_fp64_t zipf_theta; |
| 118 | fio_fp64_t pareto_h; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 119 | |
| 120 | unsigned int random_generator; |
| 121 | |
Jens Axboe | d947227 | 2013-07-25 10:20:45 -0600 | [diff] [blame] | 122 | unsigned int perc_rand[DDIR_RWDIR_CNT]; |
Jens Axboe | 211c9b8 | 2013-04-26 08:56:17 -0600 | [diff] [blame] | 123 | |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 124 | unsigned int hugepage_size; |
| 125 | unsigned int rw_min_bs; |
| 126 | unsigned int thinktime; |
| 127 | unsigned int thinktime_spin; |
| 128 | unsigned int thinktime_blocks; |
| 129 | unsigned int fsync_blocks; |
| 130 | unsigned int fdatasync_blocks; |
| 131 | unsigned int barrier_blocks; |
| 132 | unsigned long long start_delay; |
Christian Ehrhardt | 23ed19b | 2014-02-20 09:07:02 -0800 | [diff] [blame] | 133 | unsigned long long start_delay_high; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 134 | unsigned long long timeout; |
| 135 | unsigned long long ramp_time; |
| 136 | unsigned int overwrite; |
| 137 | unsigned int bw_avg_time; |
| 138 | unsigned int iops_avg_time; |
| 139 | unsigned int loops; |
| 140 | unsigned long long zone_range; |
| 141 | unsigned long long zone_size; |
| 142 | unsigned long long zone_skip; |
Jens Axboe | 81c6b6c | 2013-04-10 19:30:50 +0200 | [diff] [blame] | 143 | unsigned long long lockmem; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 144 | enum fio_memtype mem_type; |
| 145 | unsigned int mem_align; |
| 146 | |
| 147 | unsigned int max_latency; |
| 148 | |
| 149 | unsigned int stonewall; |
| 150 | unsigned int new_group; |
| 151 | unsigned int numjobs; |
| 152 | os_cpu_mask_t cpumask; |
| 153 | unsigned int cpumask_set; |
| 154 | os_cpu_mask_t verify_cpumask; |
| 155 | unsigned int verify_cpumask_set; |
| 156 | #ifdef CONFIG_LIBNUMA |
| 157 | struct bitmask *numa_cpunodesmask; |
| 158 | unsigned int numa_cpumask_set; |
| 159 | unsigned short numa_mem_mode; |
| 160 | unsigned int numa_mem_prefer_node; |
| 161 | struct bitmask *numa_memnodesmask; |
| 162 | unsigned int numa_memmask_set; |
| 163 | #endif |
| 164 | unsigned int iolog; |
| 165 | unsigned int rwmixcycle; |
Jens Axboe | 5054e67 | 2013-11-08 10:57:08 -0700 | [diff] [blame] | 166 | unsigned int rwmix[DDIR_RWDIR_CNT]; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 167 | unsigned int nice; |
Jens Axboe | 81c6b6c | 2013-04-10 19:30:50 +0200 | [diff] [blame] | 168 | unsigned int ioprio; |
| 169 | unsigned int ioprio_class; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 170 | unsigned int file_service_type; |
| 171 | unsigned int group_reporting; |
| 172 | unsigned int fadvise_hint; |
| 173 | enum fio_fallocate_mode fallocate_mode; |
| 174 | unsigned int zero_buffers; |
| 175 | unsigned int refill_buffers; |
| 176 | unsigned int scramble_buffers; |
Jens Axboe | ce35b1e | 2014-01-14 15:35:58 -0700 | [diff] [blame] | 177 | char buffer_pattern[MAX_PATTERN_SIZE]; |
| 178 | unsigned int buffer_pattern_bytes; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 179 | unsigned int compress_percentage; |
| 180 | unsigned int compress_chunk; |
| 181 | unsigned int time_based; |
| 182 | unsigned int disable_lat; |
| 183 | unsigned int disable_clat; |
| 184 | unsigned int disable_slat; |
| 185 | unsigned int disable_bw; |
| 186 | unsigned int unified_rw_rep; |
| 187 | unsigned int gtod_reduce; |
| 188 | unsigned int gtod_cpu; |
| 189 | unsigned int gtod_offload; |
| 190 | enum fio_cs clocksource; |
| 191 | unsigned int no_stall; |
| 192 | unsigned int trim_percentage; |
| 193 | unsigned int trim_batch; |
| 194 | unsigned int trim_zero; |
| 195 | unsigned long long trim_backlog; |
| 196 | unsigned int clat_percentiles; |
| 197 | unsigned int percentile_precision; /* digits after decimal for percentiles */ |
| 198 | fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN]; |
| 199 | |
| 200 | char *read_iolog_file; |
| 201 | char *write_iolog_file; |
| 202 | char *bw_log_file; |
| 203 | char *lat_log_file; |
| 204 | char *iops_log_file; |
| 205 | char *replay_redirect; |
| 206 | |
| 207 | /* |
| 208 | * Pre-run and post-run shell |
| 209 | */ |
| 210 | char *exec_prerun; |
| 211 | char *exec_postrun; |
| 212 | |
| 213 | unsigned int rate[DDIR_RWDIR_CNT]; |
| 214 | unsigned int ratemin[DDIR_RWDIR_CNT]; |
| 215 | unsigned int ratecycle; |
| 216 | unsigned int rate_iops[DDIR_RWDIR_CNT]; |
| 217 | unsigned int rate_iops_min[DDIR_RWDIR_CNT]; |
| 218 | |
| 219 | char *ioscheduler; |
| 220 | |
| 221 | /* |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 222 | * I/O Error handling |
| 223 | */ |
| 224 | enum error_type continue_on_error; |
| 225 | |
| 226 | /* |
| 227 | * Benchmark profile type |
| 228 | */ |
| 229 | char *profile; |
| 230 | |
| 231 | /* |
| 232 | * blkio cgroup support |
| 233 | */ |
| 234 | char *cgroup; |
| 235 | unsigned int cgroup_weight; |
| 236 | unsigned int cgroup_nodelete; |
| 237 | |
| 238 | unsigned int uid; |
| 239 | unsigned int gid; |
| 240 | |
| 241 | int flow_id; |
| 242 | int flow; |
| 243 | int flow_watermark; |
| 244 | unsigned int flow_sleep; |
| 245 | |
| 246 | unsigned long long offset_increment; |
Jens Axboe | ddf24e4 | 2013-08-09 12:53:44 -0600 | [diff] [blame] | 247 | unsigned long long number_ios; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 248 | |
| 249 | unsigned int sync_file_range; |
Jens Axboe | 3e260a4 | 2013-12-09 12:38:53 -0700 | [diff] [blame] | 250 | |
| 251 | unsigned long long latency_target; |
| 252 | unsigned long long latency_window; |
| 253 | fio_fp64_t latency_percentile; |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 254 | }; |
| 255 | |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 256 | #define FIO_TOP_STR_MAX 256 |
| 257 | |
| 258 | struct thread_options_pack { |
| 259 | uint8_t description[FIO_TOP_STR_MAX]; |
| 260 | uint8_t name[FIO_TOP_STR_MAX]; |
| 261 | uint8_t directory[FIO_TOP_STR_MAX]; |
| 262 | uint8_t filename[FIO_TOP_STR_MAX]; |
Jens Axboe | 22f8045 | 2013-04-09 20:29:16 +0200 | [diff] [blame] | 263 | uint8_t filename_format[FIO_TOP_STR_MAX]; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 264 | uint8_t opendir[FIO_TOP_STR_MAX]; |
| 265 | uint8_t ioengine[FIO_TOP_STR_MAX]; |
Jens Axboe | 83ea422 | 2012-03-28 14:01:46 +0200 | [diff] [blame] | 266 | uint8_t mmapfile[FIO_TOP_STR_MAX]; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 267 | uint32_t td_ddir; |
| 268 | uint32_t rw_seq; |
| 269 | uint32_t kb_base; |
Jens Axboe | 22f8045 | 2013-04-09 20:29:16 +0200 | [diff] [blame] | 270 | uint32_t unit_base; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 271 | uint32_t ddir_seq_nr; |
| 272 | uint64_t ddir_seq_add; |
| 273 | uint32_t iodepth; |
| 274 | uint32_t iodepth_low; |
| 275 | uint32_t iodepth_batch; |
| 276 | uint32_t iodepth_batch_complete; |
| 277 | |
| 278 | uint64_t size; |
| 279 | uint32_t size_percent; |
| 280 | uint32_t fill_device; |
| 281 | uint64_t file_size_low; |
| 282 | uint64_t file_size_high; |
| 283 | uint64_t start_offset; |
| 284 | |
Jens Axboe | b999b3c | 2012-09-24 09:39:49 +0200 | [diff] [blame] | 285 | uint32_t bs[DDIR_RWDIR_CNT]; |
| 286 | uint32_t ba[DDIR_RWDIR_CNT]; |
| 287 | uint32_t min_bs[DDIR_RWDIR_CNT]; |
| 288 | uint32_t max_bs[DDIR_RWDIR_CNT]; |
| 289 | struct bssplit bssplit[DDIR_RWDIR_CNT][BSSPLIT_MAX]; |
| 290 | uint32_t bssplit_nr[DDIR_RWDIR_CNT]; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 291 | |
Jens Axboe | e65a950 | 2012-09-24 09:24:04 +0200 | [diff] [blame] | 292 | uint32_t ignore_error[ERROR_TYPE_CNT][ERROR_STR_MAX]; |
| 293 | uint32_t ignore_error_nr[ERROR_TYPE_CNT]; |
| 294 | uint32_t error_dump; |
| 295 | |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 296 | uint32_t nr_files; |
| 297 | uint32_t open_files; |
| 298 | uint32_t file_lock_mode; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 299 | |
| 300 | uint32_t odirect; |
Chris Mason | d01612f | 2013-11-15 15:52:58 -0700 | [diff] [blame] | 301 | uint32_t oatomic; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 302 | uint32_t invalidate_cache; |
| 303 | uint32_t create_serialize; |
| 304 | uint32_t create_fsync; |
| 305 | uint32_t create_on_open; |
Jens Axboe | fb390e2 | 2012-05-07 09:54:41 +0200 | [diff] [blame] | 306 | uint32_t create_only; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 307 | uint32_t end_fsync; |
| 308 | uint32_t pre_read; |
| 309 | uint32_t sync_io; |
| 310 | uint32_t verify; |
| 311 | uint32_t do_verify; |
| 312 | uint32_t verifysort; |
Jens Axboe | 836fcc0 | 2013-01-24 09:08:45 -0700 | [diff] [blame] | 313 | uint32_t verifysort_nr; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 314 | uint32_t verify_interval; |
| 315 | uint32_t verify_offset; |
| 316 | uint8_t verify_pattern[MAX_PATTERN_SIZE]; |
| 317 | uint32_t verify_pattern_bytes; |
| 318 | uint32_t verify_fatal; |
| 319 | uint32_t verify_dump; |
| 320 | uint32_t verify_async; |
| 321 | uint64_t verify_backlog; |
| 322 | uint32_t verify_batch; |
Jens Axboe | 836fcc0 | 2013-01-24 09:08:45 -0700 | [diff] [blame] | 323 | uint32_t experimental_verify; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 324 | uint32_t use_thread; |
| 325 | uint32_t unlink; |
| 326 | uint32_t do_disk_util; |
| 327 | uint32_t override_sync; |
| 328 | uint32_t rand_repeatable; |
Christian Ehrhardt | 56e2a5f | 2014-02-20 09:10:17 -0800 | [diff] [blame] | 329 | uint32_t allrand_repeatable; |
Grant Grundler | 363cffa | 2014-01-28 15:11:23 -0700 | [diff] [blame] | 330 | uint64_t rand_seed; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 331 | uint32_t use_os_rand; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 332 | uint32_t log_avg_msec; |
| 333 | uint32_t norandommap; |
| 334 | uint32_t softrandommap; |
| 335 | uint32_t bs_unaligned; |
| 336 | uint32_t fsync_on_close; |
Jens Axboe | 6aca9b3 | 2013-07-25 12:45:26 -0600 | [diff] [blame] | 337 | uint32_t bs_is_seq_rand; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 338 | |
Jens Axboe | 1e5324e | 2012-11-14 14:25:31 -0700 | [diff] [blame] | 339 | uint32_t random_distribution; |
| 340 | fio_fp64_t zipf_theta; |
| 341 | fio_fp64_t pareto_h; |
| 342 | |
Jens Axboe | 49758e1 | 2012-12-03 14:37:23 +0100 | [diff] [blame] | 343 | uint32_t random_generator; |
| 344 | |
Jens Axboe | d947227 | 2013-07-25 10:20:45 -0600 | [diff] [blame] | 345 | uint32_t perc_rand[DDIR_RWDIR_CNT]; |
Jens Axboe | 211c9b8 | 2013-04-26 08:56:17 -0600 | [diff] [blame] | 346 | |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 347 | uint32_t hugepage_size; |
| 348 | uint32_t rw_min_bs; |
| 349 | uint32_t thinktime; |
| 350 | uint32_t thinktime_spin; |
| 351 | uint32_t thinktime_blocks; |
| 352 | uint32_t fsync_blocks; |
| 353 | uint32_t fdatasync_blocks; |
| 354 | uint32_t barrier_blocks; |
| 355 | uint64_t start_delay; |
Christian Ehrhardt | 23ed19b | 2014-02-20 09:07:02 -0800 | [diff] [blame] | 356 | uint64_t start_delay_high; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 357 | uint64_t timeout; |
| 358 | uint64_t ramp_time; |
| 359 | uint32_t overwrite; |
| 360 | uint32_t bw_avg_time; |
| 361 | uint32_t iops_avg_time; |
| 362 | uint32_t loops; |
| 363 | uint64_t zone_range; |
| 364 | uint64_t zone_size; |
| 365 | uint64_t zone_skip; |
Jens Axboe | ae278f9 | 2012-03-28 20:52:55 +0200 | [diff] [blame] | 366 | uint64_t lockmem; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 367 | uint32_t mem_type; |
| 368 | uint32_t mem_align; |
| 369 | |
Jens Axboe | 1e5324e | 2012-11-14 14:25:31 -0700 | [diff] [blame] | 370 | uint32_t max_latency; |
| 371 | |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 372 | uint32_t stonewall; |
| 373 | uint32_t new_group; |
| 374 | uint32_t numjobs; |
| 375 | uint8_t cpumask[FIO_TOP_STR_MAX]; |
| 376 | uint32_t cpumask_set; |
| 377 | uint8_t verify_cpumask[FIO_TOP_STR_MAX]; |
| 378 | uint32_t verify_cpumask_set; |
| 379 | uint32_t iolog; |
| 380 | uint32_t rwmixcycle; |
Jens Axboe | 5054e67 | 2013-11-08 10:57:08 -0700 | [diff] [blame] | 381 | uint32_t rwmix[DDIR_RWDIR_CNT]; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 382 | uint32_t nice; |
Jens Axboe | 28727df | 2012-03-29 08:33:15 +0200 | [diff] [blame] | 383 | uint32_t ioprio; |
| 384 | uint32_t ioprio_class; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 385 | uint32_t file_service_type; |
| 386 | uint32_t group_reporting; |
| 387 | uint32_t fadvise_hint; |
| 388 | uint32_t fallocate_mode; |
| 389 | uint32_t zero_buffers; |
| 390 | uint32_t refill_buffers; |
| 391 | uint32_t scramble_buffers; |
Jens Axboe | ce35b1e | 2014-01-14 15:35:58 -0700 | [diff] [blame] | 392 | uint8_t buffer_pattern[MAX_PATTERN_SIZE]; |
| 393 | uint32_t buffer_pattern_bytes; |
Jens Axboe | e476994 | 2012-03-13 14:01:11 +0100 | [diff] [blame] | 394 | unsigned int compress_percentage; |
| 395 | unsigned int compress_chunk; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 396 | uint32_t time_based; |
| 397 | uint32_t disable_lat; |
| 398 | uint32_t disable_clat; |
| 399 | uint32_t disable_slat; |
| 400 | uint32_t disable_bw; |
Jens Axboe | 95820b6 | 2013-01-31 13:23:40 +0100 | [diff] [blame] | 401 | uint32_t unified_rw_rep; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 402 | uint32_t gtod_reduce; |
| 403 | uint32_t gtod_cpu; |
| 404 | uint32_t gtod_offload; |
| 405 | uint32_t clocksource; |
| 406 | uint32_t no_stall; |
| 407 | uint32_t trim_percentage; |
| 408 | uint32_t trim_batch; |
| 409 | uint32_t trim_zero; |
| 410 | uint64_t trim_backlog; |
| 411 | uint32_t clat_percentiles; |
Jens Axboe | 9db01ef | 2013-02-07 15:45:39 +0100 | [diff] [blame] | 412 | uint32_t percentile_precision; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 413 | fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN]; |
| 414 | |
| 415 | uint8_t read_iolog_file[FIO_TOP_STR_MAX]; |
| 416 | uint8_t write_iolog_file[FIO_TOP_STR_MAX]; |
| 417 | uint8_t bw_log_file[FIO_TOP_STR_MAX]; |
| 418 | uint8_t lat_log_file[FIO_TOP_STR_MAX]; |
| 419 | uint8_t iops_log_file[FIO_TOP_STR_MAX]; |
| 420 | uint8_t replay_redirect[FIO_TOP_STR_MAX]; |
| 421 | |
| 422 | /* |
| 423 | * Pre-run and post-run shell |
| 424 | */ |
| 425 | uint8_t exec_prerun[FIO_TOP_STR_MAX]; |
| 426 | uint8_t exec_postrun[FIO_TOP_STR_MAX]; |
| 427 | |
Jens Axboe | b999b3c | 2012-09-24 09:39:49 +0200 | [diff] [blame] | 428 | uint32_t rate[DDIR_RWDIR_CNT]; |
| 429 | uint32_t ratemin[DDIR_RWDIR_CNT]; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 430 | uint32_t ratecycle; |
Jens Axboe | b999b3c | 2012-09-24 09:39:49 +0200 | [diff] [blame] | 431 | uint32_t rate_iops[DDIR_RWDIR_CNT]; |
| 432 | uint32_t rate_iops_min[DDIR_RWDIR_CNT]; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 433 | |
| 434 | uint8_t ioscheduler[FIO_TOP_STR_MAX]; |
| 435 | |
| 436 | /* |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 437 | * I/O Error handling |
| 438 | */ |
| 439 | uint32_t continue_on_error; |
| 440 | |
| 441 | /* |
| 442 | * Benchmark profile type |
| 443 | */ |
| 444 | uint8_t profile[FIO_TOP_STR_MAX]; |
| 445 | |
| 446 | /* |
| 447 | * blkio cgroup support |
| 448 | */ |
| 449 | uint8_t cgroup[FIO_TOP_STR_MAX]; |
| 450 | uint32_t cgroup_weight; |
| 451 | uint32_t cgroup_nodelete; |
| 452 | |
| 453 | uint32_t uid; |
| 454 | uint32_t gid; |
| 455 | |
| 456 | int32_t flow_id; |
| 457 | int32_t flow; |
| 458 | int32_t flow_watermark; |
| 459 | uint32_t flow_sleep; |
| 460 | |
Jens Axboe | 6a4cf74 | 2012-03-16 14:02:54 +0100 | [diff] [blame] | 461 | uint64_t offset_increment; |
Jens Axboe | ddf24e4 | 2013-08-09 12:53:44 -0600 | [diff] [blame] | 462 | uint64_t number_ios; |
Jens Axboe | 6a4cf74 | 2012-03-16 14:02:54 +0100 | [diff] [blame] | 463 | |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 464 | uint32_t sync_file_range; |
Jens Axboe | 3e260a4 | 2013-12-09 12:38:53 -0700 | [diff] [blame] | 465 | |
| 466 | uint64_t latency_target; |
| 467 | uint64_t latency_window; |
| 468 | fio_fp64_t latency_percentile; |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 469 | } __attribute__((packed)); |
| 470 | |
| 471 | extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top); |
| 472 | extern void convert_thread_options_to_net(struct thread_options_pack *top, struct thread_options *); |
Jens Axboe | 5116779 | 2012-03-08 21:34:18 +0100 | [diff] [blame] | 473 | extern int fio_test_cconv(struct thread_options *); |
Jens Axboe | 588b7f0 | 2012-03-19 20:37:41 +0100 | [diff] [blame] | 474 | extern void options_default_fill(struct thread_options *o); |
Jens Axboe | 2dc1cbb | 2012-03-08 14:52:25 +0100 | [diff] [blame] | 475 | |
Jens Axboe | 8062f52 | 2013-04-10 15:01:42 +0200 | [diff] [blame] | 476 | #endif |