From 9d482b4e8ddcc17c39ab45ade6afcfd125bda2bb Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Tue, 20 Mar 2018 17:47:20 +0530 Subject: 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 > Signed-off-by: Milind Changire (cherry picked from commit 7d641313f46789ec0a7ba0cc04f504724c780855) Change-Id: Ib6838fb8b928e15602a3d36fd66b7ba08999430b BUG: 1550946 Signed-off-by: Milind Changire --- rpc/rpc-lib/src/autoscale-threads.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/autoscale-threads.c') diff --git a/rpc/rpc-lib/src/autoscale-threads.c b/rpc/rpc-lib/src/autoscale-threads.c index e0e89586160..9e20b37ac63 100644 --- a/rpc/rpc-lib/src/autoscale-threads.c +++ b/rpc/rpc-lib/src/autoscale-threads.c @@ -10,13 +10,16 @@ #include "event.h" #include "rpcsvc.h" +#include "server.h" void -rpcsvc_autoscale_threads (glusterfs_ctx_t *ctx, rpcsvc_t *rpc, int incr) +rpcsvc_autoscale_threads (glusterfs_ctx_t *ctx, int incr, xlator_t *this) { struct event_pool *pool = ctx->event_pool; + server_conf_t *conf = this->private; int thread_count = pool->eventthreadcount; pool->auto_thread_count += incr; (void) event_reconfigure_threads (pool, thread_count+incr); + rpcsvc_ownthread_reconf (conf->rpc, pool->eventthreadcount); } -- cgit