X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=446482354fd909125c911defe6f27b9ceb83fee9;hp=0601b376414b80cd31f44eb80d5e60e7119cf268;hb=e9d512d8e7d2b3aaeb901b4cd68793b2638e200e;hpb=b63efd302dc3b762a21264ca66e07c74b697b608 diff --git a/fio.h b/fio.h index 0601b376..44648235 100644 --- a/fio.h +++ b/fio.h @@ -235,14 +235,24 @@ struct thread_data { uint64_t total_io_size; uint64_t fill_device_size; + /* + * Issue side + */ uint64_t io_issues[DDIR_RWDIR_CNT]; + uint64_t io_issue_bytes[DDIR_RWDIR_CNT]; + uint64_t loops; + + /* + * Completions + */ uint64_t io_blocks[DDIR_RWDIR_CNT]; uint64_t this_io_blocks[DDIR_RWDIR_CNT]; uint64_t io_bytes[DDIR_RWDIR_CNT]; - uint64_t io_skip_bytes; uint64_t this_io_bytes[DDIR_RWDIR_CNT]; + uint64_t io_skip_bytes; uint64_t zone_bytes; struct fio_mutex *mutex; + uint64_t bytes_done[DDIR_RWDIR_CNT]; /* * State for random io, a bitmap of blocks done vs not done @@ -252,6 +262,7 @@ struct thread_data { struct timeval start; /* start of this loop */ struct timeval epoch; /* time job was started */ struct timeval last_issue; + long time_offset; struct timeval tv_cache; struct timeval terminate_time; unsigned int tv_cache_nr; @@ -564,16 +575,15 @@ static inline int __should_check_rate(struct thread_data *td, return 0; } -static inline int should_check_rate(struct thread_data *td, - uint64_t *bytes_done) +static inline int should_check_rate(struct thread_data *td) { int ret = 0; - if (bytes_done[DDIR_READ]) + if (td->bytes_done[DDIR_READ]) ret |= __should_check_rate(td, DDIR_READ); - if (bytes_done[DDIR_WRITE]) + if (td->bytes_done[DDIR_WRITE]) ret |= __should_check_rate(td, DDIR_WRITE); - if (bytes_done[DDIR_TRIM]) + if (td->bytes_done[DDIR_TRIM]) ret |= __should_check_rate(td, DDIR_TRIM); return ret; @@ -639,8 +649,12 @@ enum { FIO_RAND_DIST_RANDOM = 0, FIO_RAND_DIST_ZIPF, FIO_RAND_DIST_PARETO, + FIO_RAND_DIST_GAUSS, }; +#define FIO_DEF_ZIPF 1.1 +#define FIO_DEF_PARETO 0.2 + enum { FIO_RAND_GEN_TAUSWORTHE = 0, FIO_RAND_GEN_LFSR,