diff options
author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-03-16 07:03:02 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-03-17 17:17:49 +0530 |
commit | 8e3e0e776cc04ad9f840383c4693ee73adc79558 (patch) | |
tree | a27c6c3d147e3994d3535bc754112f7fb4df1151 /xlators/performance/io-threads/src/io-threads.h | |
parent | 3a83fdc459a620d5ce0360bcf5fa071118d5430f (diff) |
IO-threads Cleanup: Change workers list to dynamically allocated array
Worker threads were represented as a list in iot_conf_t
which made us traverse the list of workers in order to
decide which thread gets the request. Now we represent the
workers as a dynamically allocated array so that we can just index
into the array to schedule the file.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h index 73a76fa8f..9798a09ed 100644 --- a/xlators/performance/io-threads/src/io-threads.h +++ b/xlators/performance/io-threads/src/io-threads.h @@ -56,7 +56,6 @@ struct iot_request { }; struct iot_worker { - struct iot_worker *next, *prev; struct list_head rqlist; /* List of requests assigned to me. */ struct iot_conf *conf; int64_t q,dq; @@ -77,7 +76,7 @@ struct iot_file { struct iot_conf { int32_t thread_count; int32_t misc_thread_index; /* Used to schedule the miscellaneous calls like checksum */ - struct iot_worker workers; + struct iot_worker ** workers; struct iot_file files; pthread_mutex_t files_lock; |