Signed-off-by: Jens Axboe <axboe@fb.com>
extern long long trigger_timeout;
extern char *aux_path;
extern long long trigger_timeout;
extern char *aux_path;
-extern bool steadystate;
-#define STEADYSTATE_MSEC (1000)
-
extern struct thread_data *threads;
static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u)
extern struct thread_data *threads;
static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u)
if (!next_log)
next_log = DISK_UTIL_MSEC;
if (!next_log)
next_log = DISK_UTIL_MSEC;
+ if (steadystate_enabled) {
since_ss = mtime_since(&last_ss, &now);
if (since_ss >= STEADYSTATE_MSEC || STEADYSTATE_MSEC - since_ss < 10) {
steadystate_check();
since_ss = mtime_since(&last_ss, &now);
if (since_ss >= STEADYSTATE_MSEC || STEADYSTATE_MSEC - since_ss < 10) {
steadystate_check();
+ steadystate_enabled = true;
o->ss_dur /= 1000000L;
/* put all steady state info in one place */
o->ss_dur /= 1000000L;
/* put all steady state info in one place */
#include "steadystate.h"
#include "helper_thread.h"
#include "steadystate.h"
#include "helper_thread.h"
-bool steadystate = false;
+bool steadystate_enabled = false;
void steadystate_setup(void)
{
int i, prev_groupid;
struct thread_data *td, *prev_td;
void steadystate_setup(void)
{
int i, prev_groupid;
struct thread_data *td, *prev_td;
+ if (!steadystate_enabled)
extern void steadystate_setup(void);
extern void steadystate_alloc(struct thread_data *);
extern void steadystate_setup(void);
extern void steadystate_alloc(struct thread_data *);
-extern bool steadystate;
+extern bool steadystate_enabled;
/*
* For steady state detection
/*
* For steady state detection
FIO_STEADYSTATE_BW_SLOPE,
};
FIO_STEADYSTATE_BW_SLOPE,
};
+#define STEADYSTATE_MSEC 1000
+
static inline bool steadystate_check_slope(struct thread_options *o)
{
return o->ss == FIO_STEADYSTATE_IOPS_SLOPE ||
static inline bool steadystate_check_slope(struct thread_options *o)
{
return o->ss == FIO_STEADYSTATE_IOPS_SLOPE ||