diff options
author | Susant Palai <spalai@redhat.com> | 2015-05-04 16:43:02 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-05-07 01:48:38 -0700 |
commit | 98bd9830da7071eed71c95611da7ef8a5f1cf71e (patch) | |
tree | 30ded00cd485e48889ef21c4e20554fe66abc73a /xlators/cluster/dht/src/dht-common.h | |
parent | 6c578c03f0d44913d264494de5df004544c96271 (diff) |
dht/rebalance: Throttle rebalance
Throttle value will be "normal" by default. For throttling down,
a thread will be put in to sleep. And for throttling up,
gf_defrag_process_dir will wake up the sleeping threads.
Change-Id: I74d530e3effd6e60e6eec81ccc8ff65789fa9c13
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/10526
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index baf244d0564..3e2d5d725e9 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -346,6 +346,13 @@ struct gf_defrag_info_ { int32_t abort; int32_t wakeup_crawler; + /*Throttle params*/ + /*stands for reconfigured thread count*/ + int32_t recon_thread_count; + /*stands for current running thread count*/ + int32_t current_thread_count; + pthread_cond_t df_wakeup_thread; + /* Hard link handle requirement */ synclock_t link_lock; }; @@ -421,6 +428,7 @@ struct dht_conf { /* Support size-weighted rebalancing (heterogeneous bricks). */ gf_boolean_t do_weighting; gf_boolean_t randomize_by_gfid; + char *dthrottle; dht_methods_t *methods; |