X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=thread_options.h;h=ed960eeb2861de263d3ac036d3e55483ab008396;hp=484b16a56e7568dc42fd55847be967e469ae1070;hb=f6cbf8ac4f70c800bbbfc23c5dcf44ed619c0acc;hpb=5054e67c7d87f25a9eb7b647adaee5e1c9c7cc5b diff --git a/thread_options.h b/thread_options.h index 484b16a5..ed960eeb 100644 --- a/thread_options.h +++ b/thread_options.h @@ -3,9 +3,11 @@ #include "arch/arch.h" #include "os/os.h" +#include "options.h" #include "stat.h" #include "gettime.h" #include "lib/ieee754.h" +#include "lib/pattern.h" #include "td_error.h" /* @@ -17,6 +19,7 @@ enum fio_memtype { MEM_SHMHUGE, /* use shared memory segments with huge pages */ MEM_MMAP, /* use anonynomous mmap */ MEM_MMAPHUGE, /* memory mapped huge file */ + MEM_MMAPSHARED, /* use mmap with shared flag */ }; #define ERROR_STR_MAX 128 @@ -28,8 +31,13 @@ struct bssplit { uint32_t perc; }; +#define NR_OPTS_SZ (FIO_MAX_OPTS / (8 * sizeof(uint64_t))) + +#define OPT_MAGIC 0x4f50544e + struct thread_options { - int pad; + int magic; + uint64_t set_options[NR_OPTS_SZ]; char *description; char *name; char *directory; @@ -43,15 +51,18 @@ struct thread_options { unsigned int kb_base; unsigned int unit_base; unsigned int ddir_seq_nr; - long ddir_seq_add; + long long ddir_seq_add; unsigned int iodepth; unsigned int iodepth_low; unsigned int iodepth_batch; - unsigned int iodepth_batch_complete; + unsigned int iodepth_batch_complete_min; + unsigned int iodepth_batch_complete_max; unsigned long long size; + unsigned long long io_limit; unsigned int size_percent; unsigned int fill_device; + unsigned int file_append; unsigned long long file_size_low; unsigned long long file_size_high; unsigned long long start_offset; @@ -72,6 +83,7 @@ struct thread_options { enum file_lock_mode file_lock_mode; unsigned int odirect; + unsigned int oatomic; unsigned int invalidate_cache; unsigned int create_serialize; unsigned int create_fsync; @@ -88,29 +100,41 @@ struct thread_options { unsigned int verify_offset; char verify_pattern[MAX_PATTERN_SIZE]; unsigned int verify_pattern_bytes; + struct pattern_fmt verify_fmt[8]; + unsigned int verify_fmt_sz; unsigned int verify_fatal; unsigned int verify_dump; unsigned int verify_async; unsigned long long verify_backlog; unsigned int verify_batch; unsigned int experimental_verify; + unsigned int verify_state; + unsigned int verify_state_save; unsigned int use_thread; unsigned int unlink; unsigned int do_disk_util; unsigned int override_sync; unsigned int rand_repeatable; - unsigned int use_os_rand; + unsigned int allrand_repeatable; + unsigned long long rand_seed; + unsigned int dep_use_os_rand; unsigned int log_avg_msec; + unsigned int log_offset; + unsigned int log_gz; + unsigned int log_gz_store; unsigned int norandommap; unsigned int softrandommap; unsigned int bs_unaligned; unsigned int fsync_on_close; unsigned int bs_is_seq_rand; + unsigned int verify_only; + unsigned int random_distribution; fio_fp64_t zipf_theta; fio_fp64_t pareto_h; + fio_fp64_t gauss_dev; unsigned int random_generator; @@ -125,6 +149,7 @@ struct thread_options { unsigned int fdatasync_blocks; unsigned int barrier_blocks; unsigned long long start_delay; + unsigned long long start_delay_high; unsigned long long timeout; unsigned long long ramp_time; unsigned int overwrite; @@ -144,17 +169,12 @@ struct thread_options { unsigned int new_group; unsigned int numjobs; os_cpu_mask_t cpumask; - unsigned int cpumask_set; os_cpu_mask_t verify_cpumask; - unsigned int verify_cpumask_set; -#ifdef CONFIG_LIBNUMA - struct bitmask *numa_cpunodesmask; - unsigned int numa_cpumask_set; + unsigned int cpus_allowed_policy; + char *numa_cpunodes; unsigned short numa_mem_mode; unsigned int numa_mem_prefer_node; - struct bitmask *numa_memnodesmask; - unsigned int numa_memmask_set; -#endif + char *numa_memnodes; unsigned int iolog; unsigned int rwmixcycle; unsigned int rwmix[DDIR_RWDIR_CNT]; @@ -164,12 +184,16 @@ struct thread_options { unsigned int file_service_type; unsigned int group_reporting; unsigned int fadvise_hint; + unsigned int fadvise_stream; enum fio_fallocate_mode fallocate_mode; unsigned int zero_buffers; unsigned int refill_buffers; unsigned int scramble_buffers; + char buffer_pattern[MAX_PATTERN_SIZE]; + unsigned int buffer_pattern_bytes; unsigned int compress_percentage; unsigned int compress_chunk; + unsigned int dedupe_percentage; unsigned int time_based; unsigned int disable_lat; unsigned int disable_clat; @@ -178,7 +202,6 @@ struct thread_options { unsigned int unified_rw_rep; unsigned int gtod_reduce; unsigned int gtod_cpu; - unsigned int gtod_offload; enum fio_cs clocksource; unsigned int no_stall; unsigned int trim_percentage; @@ -205,6 +228,7 @@ struct thread_options { unsigned int rate[DDIR_RWDIR_CNT]; unsigned int ratemin[DDIR_RWDIR_CNT]; unsigned int ratecycle; + unsigned int io_submit_mode; unsigned int rate_iops[DDIR_RWDIR_CNT]; unsigned int rate_iops_min[DDIR_RWDIR_CNT]; @@ -239,11 +263,27 @@ struct thread_options { unsigned long long number_ios; unsigned int sync_file_range; + + unsigned long long latency_target; + unsigned long long latency_window; + fio_fp64_t latency_percentile; + + unsigned block_error_hist; + unsigned int skip_bad; + + unsigned int replay_align; + unsigned int replay_scale; + + unsigned int per_job_logs; + + unsigned int allow_create; + unsigned int allow_mounted_write; }; #define FIO_TOP_STR_MAX 256 struct thread_options_pack { + uint64_t set_options[NR_OPTS_SZ]; uint8_t description[FIO_TOP_STR_MAX]; uint8_t name[FIO_TOP_STR_MAX]; uint8_t directory[FIO_TOP_STR_MAX]; @@ -261,11 +301,15 @@ struct thread_options_pack { uint32_t iodepth; uint32_t iodepth_low; uint32_t iodepth_batch; - uint32_t iodepth_batch_complete; + uint32_t iodepth_batch_complete_min; + uint32_t iodepth_batch_complete_max; + uint32_t __proper_alignment_for_64b; uint64_t size; + uint64_t io_limit; uint32_t size_percent; uint32_t fill_device; + uint32_t file_append; uint64_t file_size_low; uint64_t file_size_high; uint64_t start_offset; @@ -286,6 +330,7 @@ struct thread_options_pack { uint32_t file_lock_mode; uint32_t odirect; + uint32_t oatomic; uint32_t invalidate_cache; uint32_t create_serialize; uint32_t create_fsync; @@ -308,13 +353,20 @@ struct thread_options_pack { uint64_t verify_backlog; uint32_t verify_batch; uint32_t experimental_verify; + uint32_t verify_state; + uint32_t verify_state_save; uint32_t use_thread; uint32_t unlink; uint32_t do_disk_util; uint32_t override_sync; uint32_t rand_repeatable; - uint32_t use_os_rand; + uint32_t allrand_repeatable; + uint64_t rand_seed; + uint32_t dep_use_os_rand; uint32_t log_avg_msec; + uint32_t log_offset; + uint32_t log_gz; + uint32_t log_gz_store; uint32_t norandommap; uint32_t softrandommap; uint32_t bs_unaligned; @@ -322,8 +374,11 @@ struct thread_options_pack { uint32_t bs_is_seq_rand; uint32_t random_distribution; + uint32_t pad; + fio_fp64_t zipf_theta; fio_fp64_t pareto_h; + fio_fp64_t gauss_dev; uint32_t random_generator; @@ -338,6 +393,7 @@ struct thread_options_pack { uint32_t fdatasync_blocks; uint32_t barrier_blocks; uint64_t start_delay; + uint64_t start_delay_high; uint64_t timeout; uint64_t ramp_time; uint32_t overwrite; @@ -357,9 +413,8 @@ struct thread_options_pack { uint32_t new_group; uint32_t numjobs; uint8_t cpumask[FIO_TOP_STR_MAX]; - uint32_t cpumask_set; uint8_t verify_cpumask[FIO_TOP_STR_MAX]; - uint32_t verify_cpumask_set; + uint32_t cpus_allowed_policy; uint32_t iolog; uint32_t rwmixcycle; uint32_t rwmix[DDIR_RWDIR_CNT]; @@ -369,12 +424,16 @@ struct thread_options_pack { uint32_t file_service_type; uint32_t group_reporting; uint32_t fadvise_hint; + uint32_t fadvise_stream; uint32_t fallocate_mode; uint32_t zero_buffers; uint32_t refill_buffers; uint32_t scramble_buffers; - unsigned int compress_percentage; - unsigned int compress_chunk; + uint8_t buffer_pattern[MAX_PATTERN_SIZE]; + uint32_t buffer_pattern_bytes; + uint32_t compress_percentage; + uint32_t compress_chunk; + uint32_t dedupe_percentage; uint32_t time_based; uint32_t disable_lat; uint32_t disable_clat; @@ -383,7 +442,6 @@ struct thread_options_pack { uint32_t unified_rw_rep; uint32_t gtod_reduce; uint32_t gtod_cpu; - uint32_t gtod_offload; uint32_t clocksource; uint32_t no_stall; uint32_t trim_percentage; @@ -410,6 +468,7 @@ struct thread_options_pack { uint32_t rate[DDIR_RWDIR_CNT]; uint32_t ratemin[DDIR_RWDIR_CNT]; uint32_t ratecycle; + uint32_t io_submit_mode; uint32_t rate_iops[DDIR_RWDIR_CNT]; uint32_t rate_iops_min[DDIR_RWDIR_CNT]; @@ -444,6 +503,21 @@ struct thread_options_pack { uint64_t number_ios; uint32_t sync_file_range; + + uint64_t latency_target; + uint64_t latency_window; + fio_fp64_t latency_percentile; + + uint32_t block_error_hist; + uint32_t skip_bad; + + uint32_t replay_align; + uint32_t replay_scale; + + uint32_t per_job_logs; + + uint32_t allow_create; + uint32_t allow_mounted_write; } __attribute__((packed)); extern void convert_thread_options_to_cpu(struct thread_options *o, struct thread_options_pack *top);