diff options
author | Xavi Hernandez <xhernandez@redhat.com> | 2020-04-30 11:19:01 +0200 |
---|---|---|
committer | Rinku Kothiya <rkothiya@redhat.com> | 2020-05-30 05:17:12 +0000 |
commit | 67cd2b1ab5c9a8db637506b9a6be57fc79672c99 (patch) | |
tree | 87fef926b8766becdf5cd708ae580483ddf73927 /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 49713a7ea1d30613a8810b85eca8ab35f6e9fa8a (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.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index d7e4da8425a..f2651ebe43c 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -209,6 +209,9 @@ typedef struct { gf_boolean_t restart_done; dict_t *opts; synclock_t big_lock; + synccond_t cond_restart_bricks; + synccond_t cond_restart_shd; + synccond_t cond_blockers; rpcsvc_t *uds_rpc; /* RPCSVC for the unix domain socket */ uint32_t base_port; uint32_t max_port; |