projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75891f5
)
SUNRPC: Enqueue swapper tagged RPCs at the head of the transmit queue
author
Trond Myklebust
<trond.myklebust@hammerspace.com>
Sat, 8 Sep 2018 18:22:41 +0000
(14:22 -0400)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Sun, 30 Sep 2018 19:35:15 +0000
(15:35 -0400)
Avoid memory starvation by giving RPCs that are tagged with the
RPC_TASK_SWAPPER flag the highest priority.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprt.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/xprt.c
b/net/sunrpc/xprt.c
index b03355ae7b16e577c32341b06291ac31ac32b0f6..d7585458dfe406898cb80dbdb2c9cae36cc69434 100644
(file)
--- a/
net/sunrpc/xprt.c
+++ b/
net/sunrpc/xprt.c
@@
-1112,6
+1112,17
@@
xprt_request_enqueue_transmit(struct rpc_task *task)
INIT_LIST_HEAD(&req->rq_xmit2);
goto out;
}
+ } else if (RPC_IS_SWAPPER(task)) {
+ list_for_each_entry(pos, &xprt->xmit_queue, rq_xmit) {
+ if (pos->rq_cong || pos->rq_bytes_sent)
+ continue;
+ if (RPC_IS_SWAPPER(pos->rq_task))
+ continue;
+ /* Note: req is added _before_ pos */
+ list_add_tail(&req->rq_xmit, &pos->rq_xmit);
+ INIT_LIST_HEAD(&req->rq_xmit2);
+ goto out;
+ }
} else {
list_for_each_entry(pos, &xprt->xmit_queue, rq_xmit) {
if (pos->rq_task->tk_owner != task->tk_owner)