From 3251f475178122e9db81a1ebbc4213144c91a0a9 Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Tue, 25 Jul 2017 11:43:37 +0530 Subject: [PATCH 576/576] 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: 1473259 Signed-off-by: Susant Palai Reviewed-on: https://code.engineering.redhat.com/gerrit/113660 Reviewed-by: Atin Mukherjee --- 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 d3fae0e..c4d58ed 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -2860,20 +2860,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); } @@ -2929,11 +2927,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, -- 1.8.3.1