For RPC over UDP, after receiving a packet kick another thread as soon
as possible. This helps NFS performance.
Patch is against 2.6.0-test3.
Mark
diff -urNp linux-2.6.0-test3/net/sunrpc/svcsock.c linux-2.6.0-test3-sunrpc/net/sunrpc/svcsock.c
--- linux-2.6.0-test3/net/sunrpc/svcsock.c 2003-08-09 05:32:33.000000000 +0100
+++ linux-2.6.0-test3-sunrpc/net/sunrpc/svcsock.c 2003-08-17 19:42:58.000000000 +0100
@@ -578,8 +578,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;
@@ -590,8 +596,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
rqstp->rq_addr.sin_port = skb->h.uh->source;
rqstp->rq_addr.sin_addr.s_addr = skb->nh.iph->saddr;
- svsk->sk_sk->sk_stamp = skb->stamp;
-
if (skb_is_nonlinear(skb)) {
/* we have to copy */
local_bh_disable();
@@ -599,7 +603,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();
@@ -611,7 +614,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;
@@ -631,9 +633,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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Monday August 18, [email protected] wrote:
> For RPC over UDP, after receiving a packet kick another thread as soon
> as possible. This helps NFS performance.
> Patch is against 2.6.0-test3.
>
Yep, I like this. I'll send it on.
Have you measured any performance improvement, or it is just
theoretical?
NeilBrown
-------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs