summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2020-04-30 11:19:01 +0200
committerMOHIT AGRAWAL <moagrawa@redhat.com>2020-05-13 16:17:35 +0000
commit3da22f8cb08b05562a4c6bd2694f2f19199cff7f (patch)
tree9e8f69a2634fe6866aca1a82d46676c81dc08448 /xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
parent03a6b11179f325f6c7d91989c4f7b2acd6438d1a (diff)
syncop: improve scaling and implement more tools
The current scaling of the syncop thread pool is not working properly and can leave some tasks in the run queue more time than necessary when the maximum number of threads is not reached. This patch provides a better scaling condition to react faster to pending work. Condition variables and sleep in the context of a synctask have also been implemented. Their purpose is to replace regular condition variables and sleeps that block synctask threads and prevent other tasks to be executed. The new features have been applied to several places in glusterd. Change-Id: Ic50b7c73c104f9e41f08101a357d30b95efccfbf Fixes: #1116 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
index d96adcae89e..a05c90d7b10 100644
--- a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
@@ -114,7 +114,7 @@ glusterd_proc_stop(glusterd_proc_t *proc, int sig, int flags)
goto out;
synclock_unlock(&conf->big_lock);
- sleep(1);
+ synctask_sleep(1);
synclock_lock(&conf->big_lock);
if (gf_is_service_running(proc->pidfile, &pid)) {
ret = kill(pid, SIGKILL);