X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=steadystate.h;h=43670c12b0bb50394431b5d3bacdb4a2d1b80989;hb=94f218f6e5ef1eb2bc9190f72df5c8d105e0bac3;hp=6cd2940908a52bfd1d2729c04171c7c10e9fe4d3;hpb=0a70e050da4aee8cd296893ca253b2c0a6b52aca;p=fio.git diff --git a/steadystate.h b/steadystate.h index 6cd29409..43670c12 100644 --- a/steadystate.h +++ b/steadystate.h @@ -1,11 +1,13 @@ #ifndef FIO_STEADYSTATE_H #define FIO_STEADYSTATE_H +#include "thread_options.h" + extern void steadystate_check(void); extern void steadystate_setup(void); -extern void steadystate_alloc(struct thread_data *); -extern bool steadystate_deviation(unsigned long, unsigned long, struct thread_data *); -extern bool steadystate_slope(unsigned long, unsigned long, struct thread_data *); +extern void td_steadystate_init(struct thread_data *); + +extern bool steadystate_enabled; /* * For steady state detection @@ -14,14 +16,9 @@ struct steadystate_data { double limit; unsigned long long dur; unsigned long long ramp_time; - bool (*evaluate)(unsigned long, unsigned long, struct thread_data *); - bool check_iops; - bool check_slope; bool pct; - int attained; - int last_in_group; - int ramp_time_over; + unsigned int state; unsigned int head; unsigned int tail; @@ -43,4 +40,20 @@ struct steadystate_data { unsigned long long prev_bytes; }; +enum { + __FIO_SS_IOPS = 1, + __FIO_SS_BW = 2, + __FIO_SS_SLOPE = 4, + __FIO_SS_ATTAINED = 8, + __FIO_SS_RAMP_OVER = 16, + __FIO_SS_LAST = 32, + + FIO_SS_IOPS = __FIO_SS_IOPS, + FIO_SS_IOPS_SLOPE = __FIO_SS_IOPS | __FIO_SS_SLOPE, + FIO_SS_BW = __FIO_SS_BW, + FIO_SS_BW_SLOPE = __FIO_SS_BW | __FIO_SS_SLOPE, +}; + +#define STEADYSTATE_MSEC 1000 + #endif