projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea7a101
)
SUNRPC: Add cond_resched() at the appropriate point in __rpc_execute()
author
Trond Myklebust
<trond.myklebust@hammerspace.com>
Mon, 12 Jul 2021 13:57:08 +0000
(09:57 -0400)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Mon, 4 Oct 2021 00:49:05 +0000
(20:49 -0400)
Allow tasks that need to pre-empt rpciod/xprtiod to do so when it is
safe.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/sched.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/sched.c
b/net/sunrpc/sched.c
index c045f63d11fa649bbc317906775faf0dbf56f42f..dc46130d46a0b61d008c586b01ae94cad222bd97 100644
(file)
--- a/
net/sunrpc/sched.c
+++ b/
net/sunrpc/sched.c
@@
-903,8
+903,10
@@
static void __rpc_execute(struct rpc_task *task)
/*
* Lockless check for whether task is sleeping or not.
*/
- if (!RPC_IS_QUEUED(task))
+ if (!RPC_IS_QUEUED(task)) {
+ cond_resched();
continue;
+ }
/*
* Signalled tasks should exit rather than sleep.