From 6b23d7bb7c8250b0e95b64705f5f7ca7c00819a9 Mon Sep 17 00:00:00 2001 From: Liguang Li Date: Fri, 21 Jun 2019 12:18:58 +0800 Subject: 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#1768726 Signed-off-by: Liguang Li Signed-off-by: N Balachandran --- xlators/performance/io-threads/src/io-threads.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 060d9234cd7..1d966910062 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)", -- cgit