From: Jens Axboe Date: Fri, 12 Aug 2016 20:18:24 +0000 (-0600) Subject: steadystate: move into its own header X-Git-Tag: fio-2.16~3^2~25 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0a70e050da4aee8cd296893ca253b2c0a6b52aca steadystate: move into its own header Signed-off-by: Jens Axboe --- diff --git a/fio.h b/fio.h index ed2abe79..4ab056aa 100644 --- a/fio.h +++ b/fio.h @@ -41,6 +41,7 @@ #include "flow.h" #include "io_u_queue.h" #include "workqueue.h" +#include "steadystate.h" #ifdef CONFIG_SOLARISAIO #include @@ -122,43 +123,6 @@ struct zone_split_index { uint8_t size_perc_prev; }; -/* - * For steady state detection - */ -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 head; - unsigned int tail; - unsigned long *iops_data; - unsigned long *bw_data; - - double slope; - double criterion; - double deviation; - - unsigned long long sum_y; - unsigned long long sum_x; - unsigned long long sum_x_sq; - unsigned long long sum_xy; - unsigned long long oldest_y; - - struct timeval prev_time; - unsigned long long prev_iops; - unsigned long long prev_bytes; -}; - - /* * This describes a single thread/process executing a fio job. */ diff --git a/steadystate.h b/steadystate.h index 7a1fecdb..6cd29409 100644 --- a/steadystate.h +++ b/steadystate.h @@ -6,4 +6,41 @@ 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 *); + +/* + * For steady state detection + */ +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 head; + unsigned int tail; + unsigned long *iops_data; + unsigned long *bw_data; + + double slope; + double criterion; + double deviation; + + unsigned long long sum_y; + unsigned long long sum_x; + unsigned long long sum_x_sq; + unsigned long long sum_xy; + unsigned long long oldest_y; + + struct timeval prev_time; + unsigned long long prev_iops; + unsigned long long prev_bytes; +}; + #endif