]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix the TCP server's send buffer accounting
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 18 May 2009 21:47:56 +0000 (17:47 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 19 Jun 2009 02:58:51 +0000 (19:58 -0700)
commit615446736d368389b1be7a3d586f2179272b05d9
treecb8eb34c5e54ce278b54cb6f9c820f564c183574
parent2082f6647b8ed639921c025d48a226d8a1d7161a
SUNRPC: Fix the TCP server's send buffer accounting

Currently, the sunrpc server is refusing to allow us to process new RPC
calls if the TCP send buffer is 2/3 full, even if we do actually have
enough free space to guarantee that we can send another request.
The following patch fixes svc_tcp_has_wspace() so that we only stop
processing requests if we know that the socket buffer cannot possibly fit
another reply.

It also fixes the tcp write_space() callback so that we only clear the
SOCK_NOSPACE flag when the TCP send buffer is less than 2/3 full.
This should ensure that the send window will grow as per the standard TCP
socket code.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
net/sunrpc/svcsock.c