diff options
author | Chuck Lever <cel@netapp.com> | 2005-08-25 19:25:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:41 -0400 |
commit | 46c0ee8bc4ad3743de05e8b8b20201df44dcb6d3 (patch) | |
tree | 6b2993ff1cefb69cc3cc40c3605d088ea2af3c98 /net/sunrpc/xprtsock.c | |
parent | 49e9a89086b3cae784a4868ca852863e4f4ea3fe (diff) |
[PATCH] RPC: separate xprt_timer implementations
Allow transports to hook the retransmit timer interrupt. Some transports
calculate their congestion window here so that a retransmit timeout has
immediate effect on the congestion window.
Test-plan:
Use WAN simulation to cause sporadic bursty packet loss. Look for significant
regression in performance or client stability.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 8589c1ad55e3..c3658ff027a6 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -860,6 +860,17 @@ static void xs_tcp_set_buffer_size(struct rpc_xprt *xprt) | |||
860 | return; | 860 | return; |
861 | } | 861 | } |
862 | 862 | ||
863 | /** | ||
864 | * xs_udp_timer - called when a retransmit timeout occurs on a UDP transport | ||
865 | * @task: task that timed out | ||
866 | * | ||
867 | * Adjust the congestion window after a retransmit timeout has occurred. | ||
868 | */ | ||
869 | static void xs_udp_timer(struct rpc_task *task) | ||
870 | { | ||
871 | xprt_adjust_cwnd(task, -ETIMEDOUT); | ||
872 | } | ||
873 | |||
863 | static int xs_bindresvport(struct rpc_xprt *xprt, struct socket *sock) | 874 | static int xs_bindresvport(struct rpc_xprt *xprt, struct socket *sock) |
864 | { | 875 | { |
865 | struct sockaddr_in myaddr = { | 876 | struct sockaddr_in myaddr = { |
@@ -1050,6 +1061,7 @@ static struct rpc_xprt_ops xs_udp_ops = { | |||
1050 | .connect = xs_connect, | 1061 | .connect = xs_connect, |
1051 | .send_request = xs_udp_send_request, | 1062 | .send_request = xs_udp_send_request, |
1052 | .set_retrans_timeout = xprt_set_retrans_timeout_rtt, | 1063 | .set_retrans_timeout = xprt_set_retrans_timeout_rtt, |
1064 | .timer = xs_udp_timer, | ||
1053 | .close = xs_close, | 1065 | .close = xs_close, |
1054 | .destroy = xs_destroy, | 1066 | .destroy = xs_destroy, |
1055 | }; | 1067 | }; |