diff options
author | Milind Changire <mchangir@redhat.com> | 2018-02-26 15:14:18 +0530 |
---|---|---|
committer | Milind Changire <mchangir@redhat.com> | 2018-02-26 15:14:38 +0530 |
commit | 7d641313f46789ec0a7ba0cc04f504724c780855 (patch) | |
tree | 6111a02fd1e338de69bae6acdea833c946b1fb94 /rpc/rpc-lib/src/rpcsvc.h | |
parent | a1e59bc8fd220b4cba038e2db2630665ba871b50 (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 'rpc/rpc-lib/src/rpcsvc.h')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index 878eea28999..ec76b659965 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -422,6 +422,12 @@ struct rpcsvc_program { pthread_mutex_t queue_lock; pthread_cond_t queue_cond; pthread_t thread; + int threadcount; + /* eventthreadcount is just a readonly copy of the actual value + * owned by the event sub-system + * It is used to control the scaling of rpcsvc_request_handler threads + */ + int eventthreadcount; }; typedef struct rpcsvc_cbk_program { @@ -639,4 +645,6 @@ rpcsvc_auth_array (rpcsvc_t *svc, char *volname, int *autharr, int arrlen); rpcsvc_vector_sizer rpcsvc_get_program_vector_sizer (rpcsvc_t *svc, uint32_t prognum, uint32_t progver, int procnum); +extern int +rpcsvc_ownthread_reconf (rpcsvc_t *svc, int new_eventthreadcount); #endif |