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").
Showing the changes to include (2 of 6 files). Show all
Unified · Split
| @@ -61,9 +61,6 @@ struct svc_serv_ops { · 60 unmodified lines | ||
| 61 | 61 | /* function for service threads to run */ |
| 62 | 62 | int (*svo_function)(void *); |
| 63 | 63 | |
| 64 | − /* queue up a transport for servicing */ | |
| 65 | − void (*svo_enqueue_xprt)(struct svc_xprt *); | |
| 66 | − | |
| 67 | 64 | /* optional module to count when adding threads. |
| 68 | 65 | * Thread function must call module_put_and_kthread_exit() to exit. |
| 69 | 66 | */ |
| @@ -131,7 +131,6 @@ int svc_create_xprt(struct svc_serv *, const char *, struct net *, · 130 unmodified lines | ||
| 131 | 131 | const int, const unsigned short, int, |
| 132 | 132 | const struct cred *); |
| 133 | 133 | void svc_xprt_received(struct svc_xprt *xprt); |
| 134 | −void svc_xprt_do_enqueue(struct svc_xprt *xprt); | |
| 135 | 134 | void svc_xprt_enqueue(struct svc_xprt *xprt); |
| 136 | 135 | void svc_xprt_put(struct svc_xprt *xprt); |
| 137 | 136 | void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt); |