Commit a9ff2e99 authored by Chuck Lever's avatar Chuck Lever
Browse files

SUNRPC: Remove the .svo_enqueue_xprt method



We have never been able to track down and address the underlying
cause of the performance issues with workqueue-based service
support. svo_enqueue_xprt is called multiple times per RPC, so
it adds instruction path length, but always ends up at the same
function: svc_xprt_do_enqueue(). We do not anticipate needing
this flexibility for dynamic nfsd thread management support.

As a micro-optimization, remove .svo_enqueue_xprt because
Spectre/Meltdown makes virtual function calls more costly.

This change essentially reverts commit b9e13cdf ("nfsd/sunrpc:
turn enqueueing a svc_xprt into a svc_serv operation").

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 70a60cbf
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -353,7 +353,6 @@ static struct notifier_block lockd_inet6addr_notifier = {
static const struct svc_serv_ops lockd_sv_ops = {
	.svo_shutdown		= svc_rpcb_cleanup,
	.svo_function		= lockd,
	.svo_enqueue_xprt	= svc_xprt_do_enqueue,
	.svo_module		= THIS_MODULE,
};

+0 −2
Original line number Diff line number Diff line
@@ -234,13 +234,11 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,

static const struct svc_serv_ops nfs40_cb_sv_ops = {
	.svo_function		= nfs4_callback_svc,
	.svo_enqueue_xprt	= svc_xprt_do_enqueue,
	.svo_module		= THIS_MODULE,
};
#if defined(CONFIG_NFS_V4_1)
static const struct svc_serv_ops nfs41_cb_sv_ops = {
	.svo_function		= nfs41_callback_svc,
	.svo_enqueue_xprt	= svc_xprt_do_enqueue,
	.svo_module		= THIS_MODULE,
};

+0 −1
Original line number Diff line number Diff line
@@ -615,7 +615,6 @@ static int nfsd_get_default_max_blksize(void)
static const struct svc_serv_ops nfsd_thread_sv_ops = {
	.svo_shutdown		= nfsd_last_thread,
	.svo_function		= nfsd,
	.svo_enqueue_xprt	= svc_xprt_do_enqueue,
	.svo_module		= THIS_MODULE,
};

+0 −3
Original line number Diff line number Diff line
@@ -61,9 +61,6 @@ struct svc_serv_ops {
	/* function for service threads to run */
	int		(*svo_function)(void *);

	/* queue up a transport for servicing */
	void		(*svo_enqueue_xprt)(struct svc_xprt *);

	/* optional module to count when adding threads.
	 * Thread function must call module_put_and_kthread_exit() to exit.
	 */
+0 −1
Original line number Diff line number Diff line
@@ -131,7 +131,6 @@ int svc_create_xprt(struct svc_serv *, const char *, struct net *,
			const int, const unsigned short, int,
			const struct cred *);
void	svc_xprt_received(struct svc_xprt *xprt);
void	svc_xprt_do_enqueue(struct svc_xprt *xprt);
void	svc_xprt_enqueue(struct svc_xprt *xprt);
void	svc_xprt_put(struct svc_xprt *xprt);
void	svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt);
Loading