History

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 b9e13cdfac70 ("nfsd/sunrpc: turn enqueueing a svc_xprt into a svc_serv operation").

Chuck Lever committed 4 years ago

Commit a9ff2e91 parent 70a60cb6 files · +5 −13Browse files

Showing the changes to include (2 of 6 files). Show all

Unified · Split

2 files
  1. include/linux/sunrpc/svc.h +0 −3
  2. include/linux/sunrpc/svc_xprt.h +0 −1
include/linux/sunrpc/svc.h+0−3
@@ -61,9 +61,6 @@ struct svc_serv_ops { · 60 unmodified lines
61 /* function for service threads to run */61 /* function for service threads to run */
62 int (*svo_function)(void *);62 int (*svo_function)(void *);
63 63
64 /* queue up a transport for servicing */
65 void (*svo_enqueue_xprt)(struct svc_xprt *);
66
67 /* optional module to count when adding threads.64 /* optional module to count when adding threads.
68 * Thread function must call module_put_and_kthread_exit() to exit.65 * Thread function must call module_put_and_kthread_exit() to exit.
69 */66 */
include/linux/sunrpc/svc_xprt.h+0−1
@@ -131,7 +131,6 @@ int svc_create_xprt(struct svc_serv *, const char *, struct net *, · 130 unmodified lines
131 const int, const unsigned short, int,131 const int, const unsigned short, int,
132 const struct cred *);132 const struct cred *);
133void svc_xprt_received(struct svc_xprt *xprt);133void svc_xprt_received(struct svc_xprt *xprt);
134void svc_xprt_do_enqueue(struct svc_xprt *xprt);
135void svc_xprt_enqueue(struct svc_xprt *xprt);134void svc_xprt_enqueue(struct svc_xprt *xprt);
136void svc_xprt_put(struct svc_xprt *xprt);135void svc_xprt_put(struct svc_xprt *xprt);
137void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt);136void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t