diff -u --recursive --new-file linux-2.6.0-test3-01-fix_rcv/include/linux/sunrpc/timer.h linux-2.6.0-test3-02-revert_backoff/include/linux/sunrpc/timer.h --- linux-2.6.0-test3-01-fix_rcv/include/linux/sunrpc/timer.h 2002-11-07 09:29:01.000000000 -0800 +++ linux-2.6.0-test3-02-revert_backoff/include/linux/sunrpc/timer.h 2003-08-11 16:37:21.000000000 -0700 @@ -15,7 +15,6 @@ unsigned long timeo; /* default timeout value */ unsigned long srtt[5]; /* smoothed round trip time << 3 */ unsigned long sdrtt[5]; /* smoothed medium deviation of RTT */ - atomic_t ntimeouts; /* Global count of the number of timeouts */ }; @@ -23,19 +22,4 @@ extern void rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m); extern unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer); -static inline void rpc_inc_timeo(struct rpc_rtt *rt) -{ - atomic_inc(&rt->ntimeouts); -} - -static inline void rpc_clear_timeo(struct rpc_rtt *rt) -{ - atomic_set(&rt->ntimeouts, 0); -} - -static inline int rpc_ntimeo(struct rpc_rtt *rt) -{ - return atomic_read(&rt->ntimeouts); -} - #endif /* _LINUX_SUNRPC_TIMER_H */ diff -u --recursive --new-file linux-2.6.0-test3-01-fix_rcv/net/sunrpc/clnt.c linux-2.6.0-test3-02-revert_backoff/net/sunrpc/clnt.c --- linux-2.6.0-test3-01-fix_rcv/net/sunrpc/clnt.c 2003-08-11 16:37:05.000000000 -0700 +++ linux-2.6.0-test3-02-revert_backoff/net/sunrpc/clnt.c 2003-08-11 16:37:21.000000000 -0700 @@ -745,14 +745,14 @@ dprintk("RPC: %4d call_timeout (major)\n", task->tk_pid); if (clnt->cl_softrtry) { - if (clnt->cl_chatty && !task->tk_exit) + if (clnt->cl_chatty) printk(KERN_NOTICE "%s: server %s not responding, timed out\n", clnt->cl_protname, clnt->cl_server); rpc_exit(task, -EIO); return; } - if (clnt->cl_chatty && !(task->tk_flags & RPC_CALL_MAJORSEEN) && rpc_ntimeo(&clnt->cl_rtt) > 7) { + if (clnt->cl_chatty && !(task->tk_flags & RPC_CALL_MAJORSEEN)) { task->tk_flags |= RPC_CALL_MAJORSEEN; printk(KERN_NOTICE "%s: server %s not responding, still trying\n", clnt->cl_protname, clnt->cl_server); diff -u --recursive --new-file linux-2.6.0-test3-01-fix_rcv/net/sunrpc/timer.c linux-2.6.0-test3-02-revert_backoff/net/sunrpc/timer.c --- linux-2.6.0-test3-01-fix_rcv/net/sunrpc/timer.c 2002-11-07 09:29:01.000000000 -0800 +++ linux-2.6.0-test3-02-revert_backoff/net/sunrpc/timer.c 2003-08-11 16:37:21.000000000 -0700 @@ -41,8 +41,6 @@ rt->srtt[i] = init; rt->sdrtt[i] = RPC_RTO_INIT; } - - atomic_set(&rt->ntimeouts, 0); } /* diff -u --recursive --new-file linux-2.6.0-test3-01-fix_rcv/net/sunrpc/xprt.c linux-2.6.0-test3-02-revert_backoff/net/sunrpc/xprt.c --- linux-2.6.0-test3-01-fix_rcv/net/sunrpc/xprt.c 2003-08-11 16:37:05.000000000 -0700 +++ linux-2.6.0-test3-02-revert_backoff/net/sunrpc/xprt.c 2003-08-11 17:51:58.000000000 -0700 @@ -585,7 +585,6 @@ rpc_update_rtt(&clnt->cl_rtt, timer, (long)jiffies - req->rq_xtime); } - rpc_clear_timeo(&clnt->cl_rtt); } #ifdef RPC_PROFILE @@ -1052,21 +1051,6 @@ } /* - * Exponential backoff for UDP retries - */ -static inline int -xprt_expbackoff(struct rpc_task *task, struct rpc_rqst *req) -{ - int backoff; - - req->rq_ntimeo++; - backoff = min(rpc_ntimeo(&task->tk_client->cl_rtt), XPRT_MAX_BACKOFF); - if (req->rq_ntimeo < (1 << backoff)) - return 1; - return 0; -} - -/* * RPC receive timeout handler. */ static void @@ -1079,14 +1063,7 @@ if (req->rq_received) goto out; - if (!xprt->nocong) { - if (xprt_expbackoff(task, req)) { - rpc_add_timer(task, xprt_timer); - goto out_unlock; - } - rpc_inc_timeo(&task->tk_client->cl_rtt); - xprt_adjust_cwnd(req->rq_xprt, -ETIMEDOUT); - } + xprt_adjust_cwnd(req->rq_xprt, -ETIMEDOUT); req->rq_nresend++; dprintk("RPC: %4d xprt_timer (%s request)\n", @@ -1096,7 +1073,6 @@ out: task->tk_timeout = 0; rpc_wake_up_task(task); -out_unlock: spin_unlock(&xprt->sock_lock); } @@ -1246,7 +1222,8 @@ if (!xprt->nocong) { task->tk_timeout = rpc_calc_rto(&clnt->cl_rtt, task->tk_msg.rpc_proc->p_timer); - req->rq_ntimeo = 0; + task->tk_timeout <<= clnt->cl_timeout.to_retries + - req->rq_timeout.to_retries; if (task->tk_timeout > req->rq_timeout.to_maxval) task->tk_timeout = req->rq_timeout.to_maxval; } else