diff options
author | Liguang Li <liguang.lee6@gmail.com> | 2019-11-05 13:31:20 +0530 |
---|---|---|
committer | hari gowtham <hari.gowtham005@gmail.com> | 2019-11-13 04:53:08 +0000 |
commit | 0557ea6ddcc7281389a2623954c153b1a40b5bfa (patch) | |
tree | e105954e25c2be9128677d423d52ee0716019d46 /xlators/performance | |
parent | b95f3bdc5275f053bcca0f926d1b1d5e4cd546d7 (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.
Change-Id: I71fabb2940e76ad54dc56b4c41aeeead2644b8bb
fixes: bz#1768742
Signed-off-by: Liguang Li <liguang.lee6@gmail.com>
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 1 |
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 a4a5559e286..25583872f3d 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)", |