From c3590820ad372fa77c70ebfa37aaa0c4b540dd7a Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 25 Jan 2011 15:03:51 +0000 Subject: io-threads: implement bulk and priority queues Signed-off-by: Anand Avati Signed-off-by: Anand V. Avati BUG: 2241 (GlusterFs Stat Actions Degrade During I/O) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2241 --- xlators/performance/io-threads/src/io-threads.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'xlators/performance/io-threads/src/io-threads.h') 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; -- cgit