diff options
author | Milind Changire <mchangir@redhat.com> | 2018-03-20 17:47:20 +0530 |
---|---|---|
committer | Milind Changire <mchangir@redhat.com> | 2018-03-20 17:47:40 +0530 |
commit | 9d482b4e8ddcc17c39ab45ade6afcfd125bda2bb (patch) | |
tree | df55b66c321ce88e55e8957bbce49a54df3d3e04 /glusterfsd | |
parent | 2bb0623cfbeca29264a1b8102c738851fa0d9202 (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.
mainline:
> Reviewed-on: https://review.gluster.org/19337
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit 7d641313f46789ec0a7ba0cc04f504724c780855)
Change-Id: Ib6838fb8b928e15602a3d36fd66b7ba08999430b
BUG: 1550946
Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/Makefile.am | 1 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 11 |
2 files changed, 4 insertions, 8 deletions
diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am index 3286e639bcf..eb92e66e989 100644 --- a/glusterfsd/src/Makefile.am +++ b/glusterfsd/src/Makefile.am @@ -25,7 +25,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \ -I$(top_srcdir)/rpc/xdr/src \ -I$(top_builddir)/rpc/xdr/src \ -I$(top_srcdir)/xlators/nfs/server/src \ - -I$(top_srcdir)/xlators/protocol/server/src \ -I$(top_srcdir)/api/src AM_CFLAGS = -Wall $(GF_CFLAGS) diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 3404a5931f0..e007149c08c 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -33,7 +33,6 @@ #include "xlator.h" #include "syscall.h" #include "monitoring.h" -#include "server.h" static gf_boolean_t is_mgmt_rpc_reconnect = _gf_false; int need_emancipate = 0; @@ -834,8 +833,7 @@ glusterfs_handle_attach (rpcsvc_request_t *req) xlator_t *nextchild = NULL; glusterfs_graph_t *newgraph = NULL; glusterfs_ctx_t *ctx = NULL; - xlator_t *srv_xl = NULL; - server_conf_t *srv_conf = NULL; + xlator_t *protocol_server = NULL; GF_ASSERT (req); this = THIS; @@ -876,10 +874,9 @@ glusterfs_handle_attach (rpcsvc_request_t *req) /* we need a protocol/server xlator as * nextchild */ - srv_xl = this->ctx->active->first; - srv_conf = (server_conf_t *)srv_xl->private; - rpcsvc_autoscale_threads (this->ctx, - srv_conf->rpc, 1); + protocol_server = this->ctx->active->first; + rpcsvc_autoscale_threads (this->ctx, 1, + protocol_server); } } else { gf_log (this->name, GF_LOG_WARNING, |