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 /xlators/protocol/server/src/server.c | |
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 'xlators/protocol/server/src/server.c')
-rw-r--r-- | xlators/protocol/server/src/server.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index db96363123b..6f1d2728847 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -844,6 +844,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,7 +1505,8 @@ server_notify (xlator_t *this, int32_t event, void *data, ...) if (victim_found) (*trav_p) = (*trav_p)->next; rpc_clnt_mgmt_pmap_signout (ctx, victim->name); - rpcsvc_autoscale_threads (ctx, conf->rpc, -1); + /* we need the protocol/server xlator here as 'this' */ + rpcsvc_autoscale_threads (ctx, -1, this); default_notify (victim, GF_EVENT_CLEANUP, data); } break; |