summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2018-02-26 15:14:18 +0530
committerMilind Changire <mchangir@redhat.com>2018-02-26 15:14:38 +0530
commit7d641313f46789ec0a7ba0cc04f504724c780855 (patch)
tree6111a02fd1e338de69bae6acdea833c946b1fb94 /xlators/protocol/server
parenta1e59bc8fd220b4cba038e2db2630665ba871b50 (diff)
rpcsvc: scale rpcsvc_request_handler threads
Scale rpcsvc_request_handler threads to match the scaling of event handler threads. Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1467614#c51 for a discussion about why we need multi-threaded rpcsvc request handlers. Change-Id: Ib6838fb8b928e15602a3d36fd66b7ba08999430b Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'xlators/protocol/server')
-rw-r--r--xlators/protocol/server/src/server.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 7bd276cdece..30546e87b8d 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -843,6 +843,12 @@ do_rpc:
if (ret)
goto out;
+ /* rpcsvc thread reconfigure should be after events thread
+ * reconfigure
+ */
+ new_nthread =
+ ((struct event_pool *)(this->ctx->event_pool))->eventthreadcount;
+ ret = rpcsvc_ownthread_reconf (rpc_conf, new_nthread);
out:
THIS = oldTHIS;
gf_msg_debug ("", 0, "returning %d", ret);
@@ -1499,9 +1505,9 @@ server_notify (xlator_t *this, int32_t event, void *data, ...)
(*trav_p) = (*trav_p)->next;
glusterfs_mgmt_pmap_signout (ctx,
victim->name);
- glusterfs_autoscale_threads (THIS->ctx, -1);
+ /* we need the protocol/server xlator here as 'this' */
+ glusterfs_autoscale_threads (ctx, -1, this);
default_notify (victim, GF_EVENT_CLEANUP, data);
-
}
break;