diff -u --recursive --new-file linux-2.4.19-11-rpc_cong2/include/linux/sunrpc/xprt.h linux-2.4.19-12-rpc_cong3/include/linux/sunrpc/xprt.h --- linux-2.4.19-11-rpc_cong2/include/linux/sunrpc/xprt.h Sat Oct 5 02:05:48 2002 +++ linux-2.4.19-12-rpc_cong3/include/linux/sunrpc/xprt.h Sat Oct 5 02:08:43 2002 @@ -123,6 +123,7 @@ unsigned long cwnd; /* congestion window */ struct rpc_wait_queue sending; /* requests waiting to send */ + struct rpc_wait_queue resend; /* requests waiting to resend */ struct rpc_wait_queue pending; /* requests in flight */ struct rpc_wait_queue backlog; /* waiting for slot */ struct rpc_rqst * free; /* free slots */ diff -u --recursive --new-file linux-2.4.19-11-rpc_cong2/net/sunrpc/xprt.c linux-2.4.19-12-rpc_cong3/net/sunrpc/xprt.c --- linux-2.4.19-11-rpc_cong2/net/sunrpc/xprt.c Sat Oct 5 02:06:04 2002 +++ linux-2.4.19-12-rpc_cong3/net/sunrpc/xprt.c Sat Oct 5 02:09:24 2002 @@ -146,7 +146,10 @@ dprintk("RPC: %4d TCP write queue full\n", task->tk_pid); task->tk_timeout = 0; task->tk_status = -EAGAIN; - rpc_sleep_on(&xprt->sending, task, NULL, NULL); + if (task->tk_rqstp->rq_nresend) + rpc_sleep_on(&xprt->resend, task, NULL, NULL); + else + rpc_sleep_on(&xprt->sending, task, NULL, NULL); } return xprt->snd_task == task; } @@ -168,11 +171,14 @@ if (xprt->snd_task) return; - if (!xprt->nocong && RPCXPRT_CONGESTED(xprt)) - return; - task = rpc_wake_up_next(&xprt->sending); - if (!task) - return; + task = rpc_wake_up_next(&xprt->resend); + if (!task) { + if (!xprt->nocong && RPCXPRT_CONGESTED(xprt)) + return; + task = rpc_wake_up_next(&xprt->sending); + if (!task) + return; + } if (xprt->nocong || __xprt_get_cong(xprt, task)) xprt->snd_task = task; } @@ -1351,6 +1357,7 @@ xprt->pending = RPC_INIT_WAITQ("xprt_pending"); xprt->sending = RPC_INIT_WAITQ("xprt_sending"); + xprt->resend = RPC_INIT_WAITQ("xprt_resend"); xprt->backlog = RPC_INIT_WAITQ("xprt_backlog"); /* initialize free list */ @@ -1482,6 +1489,7 @@ { xprt->shutdown = 1; rpc_wake_up(&xprt->sending); + rpc_wake_up(&xprt->resend); rpc_wake_up(&xprt->pending); rpc_wake_up(&xprt->backlog); if (waitqueue_active(&xprt->cong_wait))