Skip to content
Commit 4a85a6a3 authored by Chuck Lever's avatar Chuck Lever
Browse files

SUNRPC: Handle TCP socket sends with kernel_sendpage() again



Daire Byrne reports a ~50% aggregrate throughput regression on his
Linux NFS server after commit da1661b9 ("SUNRPC: Teach server to
use xprt_sock_sendmsg for socket sends"), which replaced
kernel_send_page() calls in NFSD's socket send path with calls to
sock_sendmsg() using iov_iter.

Investigation showed that tcp_sendmsg() was not using zero-copy to
send the xdr_buf's bvec pages, but instead was relying on memcpy.
This means copying every byte of a large NFS READ payload.

It looks like TLS sockets do indeed support a ->sendpage method,
so it's really not necessary to use xprt_sock_sendmsg() to support
TLS fully on the server. A mechanical reversion of da1661b9 is
not possible at this point, but we can re-implement the server's
TCP socket sendmsg path using kernel_sendpage().

Reported-by: default avatarDaire Byrne <daire@dneg.com>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209439


Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent d6c9e436
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment