summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-05-18 17:47:56 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-04-07 14:36:39 -0400
commit0601f793921157603831d00a9541d92e8f5763f6 (patch)
tree41441d91749c300a76f7b633ec36040046be601a /net/sunrpc
parent6221f222c0ebf1acdf7abcf927178f40e1a65e2a (diff)
downloadlinux-stable-0601f793921157603831d00a9541d92e8f5763f6.tar.gz
linux-stable-0601f793921157603831d00a9541d92e8f5763f6.tar.bz2
linux-stable-0601f793921157603831d00a9541d92e8f5763f6.zip
SUNRPC: requeue tcp socket less frequently
Don't requeue the socket in some cases where we know it's unnecessary. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svcsock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index b7d435c3f19e..7a3e4bfd895d 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -965,7 +965,6 @@ static int svc_tcp_recv_record(struct svc_sock *svsk, struct svc_rqst *rqstp)
goto err_again; /* record not complete */
}
len = svsk->sk_reclen;
- set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
return len;
error:
@@ -1115,6 +1114,10 @@ out:
/* Reset TCP read info */
svsk->sk_reclen = 0;
svsk->sk_tcplen = 0;
+ /* If we have more data, signal svc_xprt_enqueue() to try again */
+ if (svc_recv_available(svsk) > sizeof(rpc_fraghdr))
+ set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
+
svc_xprt_copy_addrs(rqstp, &svsk->sk_xprt);
if (serv->sv_stats)