21ab4e
From 3251f475178122e9db81a1ebbc4213144c91a0a9 Mon Sep 17 00:00:00 2001
21ab4e
From: Susant Palai <spalai@redhat.com>
21ab4e
Date: Tue, 25 Jul 2017 11:43:37 +0530
21ab4e
Subject: [PATCH 576/576] cluster/dht: change log level to debug for thread
21ab4e
 activity
21ab4e
21ab4e
  Every time all the thread sleeps or wakes up, we log a message
21ab4e
about that event. Sometime this can be noisy where the number of
21ab4e
files eligible to be migrated are placed far away from each other.
21ab4e
21ab4e
Moving the logs to DEBUG.
21ab4e
21ab4e
> Change-Id: I4dc2cc9fdf4f42d4001754532a5bc4aeb3f0f959
21ab4e
> BUG: 1474639
21ab4e
> Signed-off-by: Susant Palai <spalai@redhat.com>
21ab4e
> Reviewed-on: https://review.gluster.org/17866
21ab4e
> Smoke: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> Reviewed-by: Amar Tumballi <amarts@redhat.com>
21ab4e
> Reviewed-by: N Balachandran <nbalacha@redhat.com>
21ab4e
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> Signed-off-by: Susant Palai <spalai@redhat.com>
21ab4e
21ab4e
Change-Id: I4dc2cc9fdf4f42d4001754532a5bc4aeb3f0f959
21ab4e
BUG: 1473259
21ab4e
Signed-off-by: Susant Palai <spalai@redhat.com>
21ab4e
Reviewed-on: https://code.engineering.redhat.com/gerrit/113660
21ab4e
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
21ab4e
---
21ab4e
 xlators/cluster/dht/src/dht-rebalance.c | 24 +++++++++++-------------
21ab4e
 1 file changed, 11 insertions(+), 13 deletions(-)
21ab4e
21ab4e
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
21ab4e
index d3fae0e..c4d58ed 100644
21ab4e
--- a/xlators/cluster/dht/src/dht-rebalance.c
21ab4e
+++ b/xlators/cluster/dht/src/dht-rebalance.c
21ab4e
@@ -2860,20 +2860,18 @@ gf_defrag_task (void *opaque)
21ab4e
                               (defrag->recon_thread_count <
21ab4e
                                         defrag->current_thread_count)) {
21ab4e
                                 defrag->current_thread_count--;
21ab4e
-                                gf_log ("DHT", GF_LOG_INFO,
21ab4e
-                                        "Thread sleeping. "
21ab4e
-                                        "current thread count: %d",
21ab4e
-                                         defrag->current_thread_count);
21ab4e
+                                gf_msg_debug ("DHT", 0, "Thread sleeping. "
21ab4e
+                                              "current thread count: %d",
21ab4e
+                                              defrag->current_thread_count);
21ab4e
 
21ab4e
                                 pthread_cond_wait (
21ab4e
                                            &defrag->df_wakeup_thread,
21ab4e
                                            &defrag->dfq_mutex);
21ab4e
 
21ab4e
                                 defrag->current_thread_count++;
21ab4e
-                                gf_log ("DHT", GF_LOG_INFO,
21ab4e
-                                        "Thread wokeup. "
21ab4e
-                                        "current thread count: %d",
21ab4e
-                                         defrag->current_thread_count);
21ab4e
+                                gf_msg_debug ("DHT", 0, "Thread wokeup. "
21ab4e
+                                              "current thread count: %d",
21ab4e
+                                              defrag->current_thread_count);
21ab4e
 
21ab4e
                         }
21ab4e
 
21ab4e
@@ -2929,11 +2927,11 @@ gf_defrag_task (void *opaque)
21ab4e
                                 if (!defrag->crawl_done) {
21ab4e
 
21ab4e
                                         defrag->current_thread_count--;
21ab4e
-                                        gf_log ("DHT", GF_LOG_INFO, "Thread "
21ab4e
-                                                " sleeping while  waiting for "
21ab4e
-                                                "migration entries. current "
21ab4e
-                                                "thread  count :%d",
21ab4e
-                                                defrag->current_thread_count);
21ab4e
+                                        gf_msg_debug ("DHT", 0, "Thread "
21ab4e
+                                                      "sleeping while  waiting "
21ab4e
+                                                      "for migration entries. "
21ab4e
+                                                      "current thread  count:%d",
21ab4e
+                                                      defrag->current_thread_count);
21ab4e
 
21ab4e
                                         pthread_cond_wait (
21ab4e
                                            &defrag->parallel_migration_cond,
21ab4e
-- 
21ab4e
1.8.3.1
21ab4e