summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorLiguang Li <liguang.lee6@gmail.com>2019-06-21 12:18:58 +0800
committerRavishankar N <ravishankar@redhat.com>2019-07-15 04:43:34 +0000
commitd509f480b2d85dc86f027edc4c9badf79b5eb62f (patch)
tree723302a9e02658cf40ab946cd927da40b758bd2d /xlators/performance
parentb917974ee922d7a2e079692ad7d6f61f900b37b2 (diff)
Detach iot_worker to release its resources
When iot_worker terminates, its resources have not been reaped, which will consumes lots of memory. Detach iot_worker to automically release its resources back to the system. fixes: bz#1729107 Change-Id: I71fabb2940e76ad54dc56b4c41aeeead2644b8bb Signed-off-by: Liguang Li <liguang.lee6@gmail.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index a4a5559..2558387 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -835,6 +835,7 @@ __iot_workers_scale(iot_conf_t *conf)
ret = gf_thread_create(&thread, &conf->w_attr, iot_worker, conf,
"iotwr%03hx", conf->curr_count & 0x3ff);
if (ret == 0) {
+ pthread_detach(thread);
conf->curr_count++;
gf_msg_debug(conf->this->name, 0,
"scaled threads to %d (queue_size=%d/%d)",