FIO_RAND_FILE_SIZE_OFF,
FIO_RAND_TRIM_OFF,
FIO_RAND_BUF_OFF,
- FIO_RAND_SEQ_RAND_OFF,
+ FIO_RAND_SEQ_RAND_READ_OFF,
+ FIO_RAND_SEQ_RAND_WRITE_OFF,
+ FIO_RAND_SEQ_RAND_TRIM_OFF,
FIO_RAND_NR_OFFS,
};
unsigned int tv_cache_mask;
unsigned int ramp_time_over;
+ /*
+ * Time since last latency_window was started
+ */
+ struct timeval latency_ts;
+ unsigned int latency_qd;
+ unsigned int latency_qd_high;
+ unsigned int latency_qd_low;
+ unsigned int latency_failed;
+ uint64_t latency_ios;
+
/*
* read/write mixed workload state
*/
* rand/seq mixed workload state
*/
union {
- os_random_state_t seq_rand_state;
- struct frand_state __seq_rand_state;
+ os_random_state_t seq_rand_state[DDIR_RWDIR_CNT];
+ struct frand_state __seq_rand_state[DDIR_RWDIR_CNT];
};
/*
#define __td_verror(td, err, msg, func) \
do { \
- int e = (err); \
+ int ____e = (err); \
if ((td)->error) \
break; \
- (td)->error = e; \
+ (td)->error = ____e; \
if (!(td)->first_error) \
snprintf(td->verror, sizeof(td->verror), "file:%s:%d, func=%s, error=%s", __FILE__, __LINE__, (func), (msg)); \
} while (0)
extern int fio_backend(void);
extern void reset_fio_state(void);
extern void clear_io_state(struct thread_data *);
-extern int fio_options_parse(struct thread_data *, char **, int);
+extern int fio_options_parse(struct thread_data *, char **, int, int);
extern void fio_keywords_init(void);
extern int fio_cmd_option_parse(struct thread_data *, const char *, char *);
extern int fio_cmd_ioengine_option_parse(struct thread_data *, const char *, char *);
extern void add_job_opts(const char **, int);
extern char *num2str(unsigned long, int, int, int, int);
extern int ioengine_load(struct thread_data *);
+extern int parse_dryrun(void);
extern uintptr_t page_mask;
extern uintptr_t page_size;
* blktrace support
*/
#ifdef FIO_HAVE_BLKTRACE
-extern int is_blktrace(const char *);
-extern int load_blktrace(struct thread_data *, const char *);
+extern int is_blktrace(const char *, int *);
+extern int load_blktrace(struct thread_data *, const char *, int);
#endif
+/*
+ * Latency target helpers
+ */
+extern void lat_target_check(struct thread_data *);
+extern void lat_target_init(struct thread_data *);
+
#define for_each_td(td, i) \
for ((i) = 0, (td) = &threads[0]; (i) < (int) thread_number; (i)++, (td)++)
#define for_each_file(td, f, i) \