Skip to contentSkip to conversation

nfsd/sunrpc: prepare nfsd to add workqueue mode support

RFC PATCH In review Shirley Ma 2 participants 2 messages Jun 8, 2015 – Jul 10, 2015

Subsystems (2)
lore
Share & tools
lore

Shirley Ma

author
#0 lore raw

v4 cover nfsd/sunrpc: prepare nfsd to add workqueue mode support

This patchset was originally written by Jeff Layton from adding support for a workqueue-based nfsd. I am helping on stability test and performance analysis. There are some workloads benefit from global threading mode, some workloads benefit from workqueue mode. I am still investigating on how to make workqueue mode better to bid global threading mode. I have split the original patchset into two parts: one is preparing nfsd to add workqueue support, one is adding workqueue mode. This is the first patchset, which doesn't impact nfsd threading mode performance based upon my test results. These changes make nfsd threading code more clean and easy to add workqueue mode in nfsd/sunrpc later.

sunrpc: add a new svc_serv_ops struct and move sv_shutdown into it
sunrpc: move sv_function into sv_ops
sunrpc: move sv_module parm into sv_ops
sunrpc: turn enqueueing a svc_xprt into a svc_serv operation
sunrpc: abstract out svc_set_num_threads to sv_ops
sunrpc: move pool_mode definitions into svc.h
sunrpc: factor svc_rqst allocation and freeing from sv_nrthreads refcounting

 fs/lockd/svc.c                  |   7 ++-
 fs/nfs/callback.c               |   6 ++-
 fs/nfsd/nfssvc.c                |  17 ++++--
 include/linux/sunrpc/svc.h      |  68 +++++++++++++++++-------
 include/linux/sunrpc/svc_xprt.h |   1 +
 net/sunrpc/svc.c                | 113 +++++++++++++++++++---------------------
 net/sunrpc/svc_xprt.c           |  10 ++--
 7 files changed, 135 insertions(+), 87 deletions(-)
#1 lore raw
Quoted 9 lines · Shirley Ma

This patchset was originally written by Jeff Layton from adding support for a workqueue-based nfsd. I am helping on stability test and performance analysis. There are some workloads benefit from global threading mode, some workloads benefit from workqueue mode. I am still investigating on how to make workqueue mode better to bid global threading mode. I have split the original patchset into two parts: one is preparing nfsd to add workqueue support, one is adding workqueue mode. This is the first patchset, which doesn't impact nfsd threading mode performance based upon my test results. These changes make nfsd threading code more clean and easy to add workqueue mode in nfsd/sunrpc later.

Sorry for not reviewing more quickly.

I agree that this looks fine. About half of it's justifiable just as reasonable cleanup on its own. The rest is adding some extra indirection that isn't really needed yet, but it seems fairly minimal and the workqueue stuff seems promising, so OK.

Applying for 4.3 pending some testing. Branch for testing (which will be rebased) here:

git://linux-nfs.org/~bfields/linux.git nfsd-next

--b.

Quoted 17 lines

sunrpc: add a new svc_serv_ops struct and move sv_shutdown into it
sunrpc: move sv_function into sv_ops
sunrpc: move sv_module parm into sv_ops
sunrpc: turn enqueueing a svc_xprt into a svc_serv operation
sunrpc: abstract out svc_set_num_threads to sv_ops
sunrpc: move pool_mode definitions into svc.h
sunrpc: factor svc_rqst allocation and freeing from sv_nrthreads refcounting

 fs/lockd/svc.c                  |   7 ++-
 fs/nfs/callback.c               |   6 ++-
 fs/nfsd/nfssvc.c                |  17 ++++--
 include/linux/sunrpc/svc.h      |  68 +++++++++++++++++-------
 include/linux/sunrpc/svc_xprt.h |   1 +
 net/sunrpc/svc.c                | 113 +++++++++++++++++++---------------------
 net/sunrpc/svc_xprt.c           |  10 ++--
 7 files changed, 135 insertions(+), 87 deletions(-)