summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src/io-threads.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
-rw-r--r--xlators/performance/io-threads/src/io-threads.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h
index 412b3cc7638..a613884da45 100644
--- a/xlators/performance/io-threads/src/io-threads.h
+++ b/xlators/performance/io-threads/src/io-threads.h
@@ -60,6 +60,11 @@ struct iot_request {
#define IOT_MIN_THREADS 32
#define IOT_MAX_THREADS 512
+#define IOT_SCALING_OFF 1
+#define IOT_SCALING_ON 2
+#define iot_ordered_scaling_on(conf) ((conf)->o_scaling == IOT_SCALING_ON)
+#define iot_unordered_scaling_on(conf) ((conf)->u_scaling == IOT_SCALING_ON)
+
struct iot_worker {
struct list_head rqlist; /* List of requests assigned to me. */
struct iot_conf *conf;
@@ -98,7 +103,12 @@ struct iot_conf {
int o_idle_time; /* in Secs. The idle time after which an
ordered thread exits.
*/
-
+ int o_scaling; /* Set to IOT_SCALING_OFF if user does not want
+ thread scaling on ordered threads.
+ If scaling is off, io-threads maintains
+ at least min_o_threads number of threads
+ and never lets any thread exit.
+ */
struct iot_worker **oworkers; /* Ordered thread pool. */
@@ -114,6 +124,13 @@ struct iot_conf {
request for this amount of secs, it should
try to die.
*/
+ int u_scaling; /* Set to IOT_SCALING_OFF if user does not want
+ thread scaling on unordered threads.
+ If scaling is off, io-threads maintains
+ at least min_u_threads number of threads
+ and never lets any thread exit.
+ */
+
};
typedef struct iot_conf iot_conf_t;