From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
"J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 1/7] SUNRPC: requeue tcp socket less frequently
Date: Wed, 6 Apr 2011 19:06:20 -0400 [thread overview]
Message-ID: <1302131186-6578-2-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1302131186-6578-1-git-send-email-bfields@redhat.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
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>
---
net/sunrpc/svcsock.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index d802e94..29b31df 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -959,7 +959,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:
@@ -1109,6 +1108,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)
--
1.7.1
next prev parent reply other threads:[~2011-04-06 23:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-06 23:06 server tcp performance patches J. Bruce Fields
2011-04-06 23:06 ` J. Bruce Fields [this message]
2011-04-06 23:06 ` [PATCH 2/7] SUNRPC: svc_tcp_recvfrom cleanup J. Bruce Fields
2011-04-06 23:06 ` [PATCH 3/7] svcrpc: note network-order types in svc_process_calldir J. Bruce Fields
2011-04-06 23:06 ` [PATCH 4/7] svcrpc: close connection if client sends short packet J. Bruce Fields
2011-04-06 23:06 ` [PATCH 5/7] svcrpc: copy cb reply instead of pages J. Bruce Fields
2011-04-06 23:06 ` [PATCH 6/7] SUNRPC: Don't wait for full record to receive tcp data J. Bruce Fields
2011-04-06 23:06 ` [PATCH 7/7] svcrpc: take advantage of tcp autotuning J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302131186-6578-2-git-send-email-bfields@redhat.com \
--to=bfields@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.