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 */
task->tk_pid, xprt->snd_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);
}
retval = xprt->snd_task == task;
spin_unlock_bh(&xprt->sock_lock);
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) {
+ task = rpc_wake_up_next(&xprt->sending);
+ if (!task)
+ return;
+ }
if (xprt->nocong || __xprt_get_cong(xprt, task))
xprt->snd_task = task;
}
INIT_RPC_WAITQ(&xprt->pending, "xprt_pending");
INIT_RPC_WAITQ(&xprt->sending, "xprt_sending");
+ INIT_RPC_WAITQ(&xprt->resend, "xprt_resend");
INIT_RPC_WAITQ(&xprt->backlog, "xprt_backlog");
/* initialize free list */
{
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))