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 --- libglusterfs/src/event-poll.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/event-poll.c b/libglusterfs/src/event-poll.c index 3bffc4784d7..b1aca826759 100644 --- a/libglusterfs/src/event-poll.c +++ b/libglusterfs/src/event-poll.c @@ -173,6 +173,13 @@ event_pool_new_poll (int count, int eventthreadcount) "thread count (%d) ignored", eventthreadcount); } + /* although, eventhreadcount for poll implementaiton is always + * going to be 1, eventthreadcount needs to be set to 1 so that + * rpcsvc_request_handler() thread scaling works flawlessly in + * both epoll and poll models + */ + event_pool->eventthreadcount = 1; + return event_pool; } -- cgit