summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src/io-threads.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-10 04:21:53 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-10 18:07:16 +0530
commite1977a4e75637109889b581201e44e24506398c8 (patch)
treeb18625905f106c21e9b16eb000a3cbeb3563223c /xlators/performance/io-threads/src/io-threads.h
parentbf7b4623821c8ffe8070297949e18dc6e3757e9c (diff)
io-threads: Use non-default thread stack size
The default stack size on Linux is around 8 MiB for each thread. This is clearly too high for our purpose. This commit reduces the stack size down to 1 MiB. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h
index 3bc37a67d..3fff676f6 100644
--- a/xlators/performance/io-threads/src/io-threads.h
+++ b/xlators/performance/io-threads/src/io-threads.h
@@ -65,6 +65,8 @@ struct iot_request {
#define iot_ordered_scaling_on(conf) ((conf)->o_scaling == IOT_SCALING_ON)
#define iot_unordered_scaling_on(conf) ((conf)->u_scaling == IOT_SCALING_ON)
+#define IOT_THREAD_STACK_SIZE ((size_t)(1024*1024))
+
struct iot_worker {
struct list_head rqlist; /* List of requests assigned to me. */
struct iot_conf *conf;
@@ -131,6 +133,10 @@ struct iot_conf {
and never lets any thread exit.
*/
+ pthread_attr_t w_attr; /* Used to reduce the stack size of the
+ pthread worker down from the default of
+ 8MiB.
+ */
};
typedef struct iot_conf iot_conf_t;