]> www.infradead.org Git - users/hch/misc.git/commit
sunrpc: allow SOMAXCONN backlogged TCP connections
authorJeff Layton <jlayton@kernel.org>
Thu, 17 Apr 2025 18:54:36 +0000 (14:54 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 11 May 2025 23:48:28 +0000 (19:48 -0400)
commitde08ffb79c8f404adc611ddb580bc74133b2c986
treeb68cca88b79d4848fde35b36e88c92b3d1e456f6
parentb31da62889e6d610114d81dc7a6edbcaa503fcf8
sunrpc: allow SOMAXCONN backlogged TCP connections

The connection backlog passed to listen() denotes the number of
connections that are fully established, but that have not yet been
accept()ed. If the amount goes above that level, new connection requests
will be dropped on the floor until the value goes down. If all the knfsd
threads are bogged down in (e.g.) disk I/O, new connection attempts can
stall because of this.

For the same rationale that Trond points out in the userland patch [1],
ensure that svc_xprt sockets created by the kernel allow SOMAXCONN
(4096) backlogged connections instead of the 64 that they do today.

[1]: https://lore.kernel.org/linux-nfs/20240308180223.2965601-1-trond.myklebust@hammerspace.com/

Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svcsock.c