diff options
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.h | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h index a6b640884d0..1a9dee9ae2c 100644 --- a/xlators/performance/io-threads/src/io-threads.h +++ b/xlators/performance/io-threads/src/io-threads.h @@ -53,6 +53,14 @@ typedef enum {          IOT_PRI_MAX,  } iot_pri_t; +#define IOT_LEAST_THROTTLE_DELAY 1	/* sample interval in seconds */ +struct iot_least_throttle { +	struct timeval	sample_time;	/* timestamp of current sample */ +	uint32_t	sample_cnt;	/* sample count for active interval */ +	uint32_t	cached_rate;	/* the most recently measured rate */ +	int32_t		rate_limit;	/* user-specified rate limit */ +	pthread_mutex_t	lock; +};  struct iot_conf {          pthread_mutex_t      mutex; @@ -75,6 +83,8 @@ struct iot_conf {          xlator_t            *this;          size_t              stack_size; + +	struct iot_least_throttle throttle;  };  typedef struct iot_conf iot_conf_t;  | 
