summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src/io-threads.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-02-19 05:21:47 -0800
committerAnand V. Avati <avati@dev.gluster.com>2009-02-19 07:08:38 -0800
commit99a1cac632b4325afb95cb7c183721c0a90925d7 (patch)
tree7dc7de4f16329e6be65594f801ca1332cb30823e /xlators/performance/io-threads/src/io-threads.h
parent57957c59cd2925540769ae9cb58029b0125e4ae7 (diff)
Reduce iothreads requests queue lock granularity.
iot_queue() and iot_dequeue() functions were using a io-threads translator-wide lock which would be contended for by every worker thread waiting for IO requests. This patch reduces the granularity by turning the lock into a per-worker lock. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
-rw-r--r--xlators/performance/io-threads/src/io-threads.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h
index 419f6fdb8e6..401d0d86dc9 100644
--- a/xlators/performance/io-threads/src/io-threads.h
+++ b/xlators/performance/io-threads/src/io-threads.h
@@ -58,6 +58,7 @@ struct iot_worker {
struct iot_conf *conf;
int64_t q,dq;
pthread_cond_t dq_cond;
+ pthread_mutex_t qlock;
int32_t fd_count;
int32_t queue_size;
pthread_t thread;
@@ -78,7 +79,6 @@ struct iot_conf {
pthread_mutex_t files_lock;
pthread_cond_t q_cond;
- pthread_mutex_t lock;
};
typedef struct iot_file iot_file_t;