a3470f
From 3bf557cd74a50f7fadaba59c86653de8887d4ffd Mon Sep 17 00:00:00 2001
a3470f
From: Milind Changire <mchangir@redhat.com>
a3470f
Date: Fri, 1 Jun 2018 12:56:20 +0530
a3470f
Subject: [PATCH 293/305] rpcsvc: correct event-thread scaling
a3470f
a3470f
Problem:
a3470f
Auto thread count derived from the number of attachs and detachs
a3470f
was reset to 1 when server_reconfigure() was called.
a3470f
a3470f
Solution:
a3470f
Avoid auto-thread-count reset to 1.
a3470f
a3470f
mainline:
a3470f
> BUG: 1547888
a3470f
> Reviewed-on: https://review.gluster.org/19689
a3470f
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
a3470f
> Signed-off-by: Milind Changire <mchangir@redhat.com>
a3470f
(cherry picked from commit 0c3d984287d91d3fe1ffeef297252d912c08a410)
a3470f
a3470f
BUG: 1554255
a3470f
Change-Id: I53217bd0634ec5dcc164338867d9d468687598b0
a3470f
Signed-off-by: Milind Changire <mchangir@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/140454
a3470f
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Mohit Agrawal <moagrawa@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 xlators/protocol/server/src/server.c | 7 ++++---
a3470f
 1 file changed, 4 insertions(+), 3 deletions(-)
a3470f
a3470f
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
a3470f
index bc87a80..69ad184 100644
a3470f
--- a/xlators/protocol/server/src/server.c
a3470f
+++ b/xlators/protocol/server/src/server.c
a3470f
@@ -1042,10 +1042,11 @@ do_rpc:
a3470f
         }
a3470f
 
a3470f
         /*
a3470f
-         * Let the event subsystem know that we're auto-scaling, with an
a3470f
-         * initial count of one.
a3470f
+         * Update:
a3470f
+         * We don't need to reset auto_thread_count since it has been derived
a3470f
+         * out of the total bricks attached. We can reconfigure event threads
a3470f
+         * but not auto threads.
a3470f
          */
a3470f
-        ((struct event_pool *)(this->ctx->event_pool))->auto_thread_count = 1;
a3470f
 
a3470f
         GF_OPTION_RECONF ("event-threads", new_nthread, options, int32, out);
a3470f
         ret = server_check_event_threads (this, conf, new_nthread);
a3470f
-- 
a3470f
1.8.3.1
a3470f