]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Increase snd buffer size for UDP
authorNeil Brown <neilb@cse.unsw.edu.au>
Sat, 18 May 2002 05:02:56 +0000 (22:02 -0700)
committerChristoph Hellwig <hch@sb.bsdonline.org>
Sat, 18 May 2002 05:02:56 +0000 (22:02 -0700)
I under-allocated the space that RPC needs for transmit on a UDP
socket.   We need lots of space to be allowed (though we may not use
much) so that a lack of un-commited transmit space will not cause new
requests to be blocked.

net/sunrpc/svcsock.c

index 542d7bfaa63ab5ada67f982a92ad8452f6b0c234..86340a0ded9574fc6721402f2ad95f1cddf42808 100644 (file)
@@ -949,12 +949,10 @@ svc_sock_update_bufs(struct svc_serv *serv)
                if (sock->type == SOCK_DGRAM) {
                        /* udp sockets need large rcvbuf as all pending
                         * requests are still in that buffer.
-                        * As outgoing requests do not wait for an
-                        * ACK, only a moderate sndbuf is needed
                         */
                        svc_sock_setbufsize(sock,
-                                           5 * serv->sv_bufsz,
-                                           (serv->sv_nrthreads+2)* serv->sv_bufsz);
+                                           (serv->sv_nrthreads+3) * serv->sv_bufsz,
+                                           (serv->sv_nrthreads+3) * serv->sv_bufsz);
                } else if (svsk->sk_sk->state != TCP_LISTEN) {
                        printk(KERN_ERR "RPC update_bufs: permanent sock neither UDP or TCP_LISTEN\n");
                }