diff options
author | Anand Avati <avati@gluster.com> | 2011-01-25 15:03:51 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-02-22 02:11:10 -0800 |
commit | c3590820ad372fa77c70ebfa37aaa0c4b540dd7a (patch) | |
tree | 133e60ee70cb5bd5386163b4e738cada98deda23 /xlators/performance/io-threads/src/io-threads.h | |
parent | 8d69845dfdd31b798fb02b08a1eabbc88d31243c (diff) |
io-threads: implement bulk and priority queues
Signed-off-by: Anand Avati <avati@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2241 (GlusterFs Stat Actions Degrade During I/O)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2241
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h index 885015c183b..2502319625c 100644 --- a/xlators/performance/io-threads/src/io-threads.h +++ b/xlators/performance/io-threads/src/io-threads.h @@ -53,6 +53,14 @@ struct iot_conf; #define IOT_THREAD_STACK_SIZE ((size_t)(1024*1024)) +typedef enum { + IOT_PRI_HI = 0, /* low latency */ + IOT_PRI_NORMAL, /* normal */ + IOT_PRI_LO, /* bulk */ + IOT_PRI_MAX, +} iot_pri_t; + + struct iot_conf { pthread_mutex_t mutex; pthread_cond_t cond; @@ -63,7 +71,8 @@ struct iot_conf { int32_t idle_time; /* in seconds */ - struct list_head req; + struct list_head reqs[IOT_PRI_MAX]; + int queue_size; pthread_attr_t w_attr; |