1 #ifndef FIO_LAT_TARGET_H
2 #define FIO_LAT_TARGET_H
7 IOD_STEPPED_DEF_RAMP = 5000,
8 IOD_STEPPED_DEF_RUN = 30000,
12 * Starts out as PROBE_RAMP -> PROBE_RUN, then iterations of
13 * RAMP -> RUN with various iops limiting settings
16 IOD_STATE_PROBE_RAMP = 1,
24 * Latency target helpers
26 void lat_target_init(struct thread_data *);
27 void lat_target_reset(struct thread_data *);
28 bool lat_target_failed(struct thread_data *td);
29 void lat_step_report(struct thread_stat *ts, struct buf_output *out);
30 bool lat_ts_has_stats(struct thread_stat *ts);
31 bool __lat_ts_has_stats(struct thread_stat *ts, enum fio_ddir);
33 void lat_fatal(struct thread_data *td, unsigned long long tnsec,
34 unsigned long long max_nsec);
36 bool lat_step_check(struct thread_data *td);
37 void __lat_target_check(struct thread_data *td);
39 static inline bool lat_target_check(struct thread_data *td)
41 if (td->o.latency_target) {
42 __lat_target_check(td);
44 } else if (td->o.iodepth_mode == IOD_STEPPED)
45 return lat_step_check(td);
50 static inline bool lat_step_account(struct thread_data *td)
52 if (td->o.iodepth_mode != IOD_STEPPED)
55 return td->latency_state == IOD_STATE_RUN;