From 332d553cb8eba208fe421723b64f8c19b43fd696 Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Tue, 25 Jul 2017 11:43:37 +0530 Subject: cluster/dht: change log level to debug for thread activity Every time all the thread sleeps or wakes up, we log a message about that event. Sometime this can be noisy where the number of files eligible to be migrated are placed far away from each other. Moving the logs to DEBUG. > Change-Id: I4dc2cc9fdf4f42d4001754532a5bc4aeb3f0f959 > BUG: 1474639 > Signed-off-by: Susant Palai > Reviewed-on: https://review.gluster.org/17866 > Smoke: Gluster Build System > Reviewed-by: Amar Tumballi > Reviewed-by: N Balachandran > CentOS-regression: Gluster Build System > Signed-off-by: Susant Palai Change-Id: I4dc2cc9fdf4f42d4001754532a5bc4aeb3f0f959 BUG: 1475662 Signed-off-by: Susant Palai Reviewed-on: https://review.gluster.org/17893 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: N Balachandran --- xlators/cluster/dht/src/dht-rebalance.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 6a9153f794d..266dc5a99a9 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -2785,20 +2785,18 @@ gf_defrag_task (void *opaque) (defrag->recon_thread_count < defrag->current_thread_count)) { defrag->current_thread_count--; - gf_log ("DHT", GF_LOG_INFO, - "Thread sleeping. " - "current thread count: %d", - defrag->current_thread_count); + gf_msg_debug ("DHT", 0, "Thread sleeping. " + "current thread count: %d", + defrag->current_thread_count); pthread_cond_wait ( &defrag->df_wakeup_thread, &defrag->dfq_mutex); defrag->current_thread_count++; - gf_log ("DHT", GF_LOG_INFO, - "Thread wokeup. " - "current thread count: %d", - defrag->current_thread_count); + gf_msg_debug ("DHT", 0, "Thread wokeup. " + "current thread count: %d", + defrag->current_thread_count); } @@ -2854,11 +2852,11 @@ gf_defrag_task (void *opaque) if (!defrag->crawl_done) { defrag->current_thread_count--; - gf_log ("DHT", GF_LOG_INFO, "Thread " - " sleeping while waiting for " - "migration entries. current " - "thread count :%d", - defrag->current_thread_count); + gf_msg_debug ("DHT", 0, "Thread " + "sleeping while waiting " + "for migration entries. " + "current thread count:%d", + defrag->current_thread_count); pthread_cond_wait ( &defrag->parallel_migration_cond, -- cgit