Skip to content

Commit 79c9915

Browse files
author
Trond Myklebust
committed
SUNRPC: Convert the xprt->sending queue back to an ordinary wait queue
We no longer need priority semantics on the xprt->sending queue, because the order in which tasks are sent is now dictated by their position in the send queue. Note that the backlog queue remains a priority queue, meaning that slot resources are still managed in order of task priority. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent f42f7c2 commit 79c9915

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

net/sunrpc/xprt.c

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static void xprt_clear_locked(struct rpc_xprt *xprt)
192192
int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
193193
{
194194
struct rpc_rqst *req = task->tk_rqstp;
195-
int priority;
196195

197196
if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
198197
if (task == xprt->snd_task)
@@ -212,13 +211,7 @@ int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
212211
task->tk_pid, xprt);
213212
task->tk_timeout = RPC_IS_SOFT(task) ? req->rq_timeout : 0;
214213
task->tk_status = -EAGAIN;
215-
if (req == NULL)
216-
priority = RPC_PRIORITY_LOW;
217-
else if (!req->rq_ntrans)
218-
priority = RPC_PRIORITY_NORMAL;
219-
else
220-
priority = RPC_PRIORITY_HIGH;
221-
rpc_sleep_on_priority(&xprt->sending, task, NULL, priority);
214+
rpc_sleep_on(&xprt->sending, task, NULL);
222215
return 0;
223216
}
224217
EXPORT_SYMBOL_GPL(xprt_reserve_xprt);
@@ -260,7 +253,6 @@ xprt_test_and_clear_congestion_window_wait(struct rpc_xprt *xprt)
260253
int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
261254
{
262255
struct rpc_rqst *req = task->tk_rqstp;
263-
int priority;
264256

265257
if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
266258
if (task == xprt->snd_task)
@@ -283,13 +275,7 @@ int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
283275
dprintk("RPC: %5u failed to lock transport %p\n", task->tk_pid, xprt);
284276
task->tk_timeout = RPC_IS_SOFT(task) ? req->rq_timeout : 0;
285277
task->tk_status = -EAGAIN;
286-
if (req == NULL)
287-
priority = RPC_PRIORITY_LOW;
288-
else if (!req->rq_ntrans)
289-
priority = RPC_PRIORITY_NORMAL;
290-
else
291-
priority = RPC_PRIORITY_HIGH;
292-
rpc_sleep_on_priority(&xprt->sending, task, NULL, priority);
278+
rpc_sleep_on(&xprt->sending, task, NULL);
293279
return 0;
294280
}
295281
EXPORT_SYMBOL_GPL(xprt_reserve_xprt_cong);
@@ -1796,7 +1782,7 @@ static void xprt_init(struct rpc_xprt *xprt, struct net *net)
17961782

17971783
rpc_init_wait_queue(&xprt->binding, "xprt_binding");
17981784
rpc_init_wait_queue(&xprt->pending, "xprt_pending");
1799-
rpc_init_priority_wait_queue(&xprt->sending, "xprt_sending");
1785+
rpc_init_wait_queue(&xprt->sending, "xprt_sending");
18001786
rpc_init_priority_wait_queue(&xprt->backlog, "xprt_backlog");
18011787

18021788
xprt_init_xid(xprt);

0 commit comments

Comments
 (0)