Skip to content

Commit 966a675

Browse files
committed
Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages"
I noticed that a handful of NFSv3 fstests were taking an unexpectedly long time to run. Troubleshooting showed that the server's TCP window closed and never re-opened, which caused the client to trigger an RPC retransmit timeout after 180 seconds. The client's recovery action was to establish a fresh connection and retransmit the timed-out requests. This worked, but it adds a long delay. I tracked the problem to the commit that attempted to reduce the rate at which the network layer delivers TCP socket data_ready callbacks. Under most circumstances this change worked as expected, but for NFSv3, which has no session or other type of throttling, it can overwhelm the receiver on occasion. I'm sure I could tweak the lowat settings, but the small benefit doesn't seem worth the bother. Just revert it. Fixes: 2b877fc ("SUNRPC: Reduce thread wake-up rate when receiving large RPC messages") Cc: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent d3edfd9 commit 966a675

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

net/sunrpc/svcsock.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,9 +1083,6 @@ static void svc_tcp_fragment_received(struct svc_sock *svsk)
10831083
/* If we have more data, signal svc_xprt_enqueue() to try again */
10841084
svsk->sk_tcplen = 0;
10851085
svsk->sk_marker = xdr_zero;
1086-
1087-
smp_wmb();
1088-
tcp_set_rcvlowat(svsk->sk_sk, 1);
10891086
}
10901087

10911088
/**
@@ -1175,17 +1172,10 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp)
11751172
goto err_delete;
11761173
if (len == want)
11771174
svc_tcp_fragment_received(svsk);
1178-
else {
1179-
/* Avoid more ->sk_data_ready() calls until the rest
1180-
* of the message has arrived. This reduces service
1181-
* thread wake-ups on large incoming messages. */
1182-
tcp_set_rcvlowat(svsk->sk_sk,
1183-
svc_sock_reclen(svsk) - svsk->sk_tcplen);
1184-
1175+
else
11851176
trace_svcsock_tcp_recv_short(&svsk->sk_xprt,
11861177
svc_sock_reclen(svsk),
11871178
svsk->sk_tcplen - sizeof(rpc_fraghdr));
1188-
}
11891179
goto err_noclose;
11901180
error:
11911181
if (len != -EAGAIN)

0 commit comments

Comments
 (0)