From: NeilBrown <neilb@cse.unsw.edu.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: nfs@lists.sourceforge.net
Subject: [PATCH] kNFSd - 3 of 3 - Release udp socket for next nfs request to arrive earlier
Date: Tue, 19 Aug 2003 14:35:10 +1000 [thread overview]
Message-ID: <E19oyD8-0001HP-00@notabene> (raw)
### Comments for ChangeSet
From: Mark Hemment <markhe@veritas.com>
For RPC over UDP, after receiving a packet kick another thread as soon
as possible. This helps NFS performance.
----------- Diffstat output ------------
./net/sunrpc/svcsock.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff ./net/sunrpc/svcsock.c~current~ ./net/sunrpc/svcsock.c
--- ./net/sunrpc/svcsock.c~current~ 2003-08-18 09:53:17.000000000 +1000
+++ ./net/sunrpc/svcsock.c 2003-08-19 08:49:47.000000000 +1000
@@ -592,8 +592,14 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
/* possibly an icmp error */
dprintk("svc: recvfrom returned error %d\n", -err);
}
+ svsk->sk_sk->sk_stamp = skb->stamp;
set_bit(SK_DATA, &svsk->sk_flags); /* there may be more data... */
+ /*
+ * Maybe more packets - kick another thread ASAP.
+ */
+ svc_sock_received(svsk);
+
len = skb->len - sizeof(struct udphdr);
rqstp->rq_arg.len = len;
@@ -605,8 +611,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
rqstp->rq_addr.sin_addr.s_addr = skb->nh.iph->saddr;
rqstp->rq_daddr = skb->nh.iph->daddr;
- svsk->sk_sk->sk_stamp = skb->stamp;
-
if (skb_is_nonlinear(skb)) {
/* we have to copy */
local_bh_disable();
@@ -614,7 +618,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
local_bh_enable();
/* checksum error */
skb_free_datagram(svsk->sk_sk, skb);
- svc_sock_received(svsk);
return 0;
}
local_bh_enable();
@@ -626,7 +629,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
if (skb->ip_summed != CHECKSUM_UNNECESSARY) {
if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
skb_free_datagram(svsk->sk_sk, skb);
- svc_sock_received(svsk);
return 0;
}
skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -646,9 +648,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
if (serv->sv_stats)
serv->sv_stats->netudpcnt++;
- /* One down, maybe more to go... */
- svc_sock_received(svsk);
-
return len;
}
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
reply other threads:[~2003-08-19 4:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E19oyD8-0001HP-00@notabene \
--to=neilb@cse.unsw.edu.au \
--cc=nfs@lists.sourceforge.net \
--cc=torvalds@osdl.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.