SUNRPC: Add cond_resched() at the appropriate point in __rpc_execute()

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>
This commit is contained in:
Trond Myklebust 2021-07-12 09:57:08 -04:00
parent ea7a1019d8
commit 47dd8796a3

View File

@ -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.