diff options
author | NeilBrown <neilb@suse.de> | 2022-03-07 02:41:44 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-03-13 19:59:35 +0300 |
commit | a41b05edfedb939440e83666f23de3ef9af33acf (patch) | |
tree | 475b53d2cf2fbb754112bfa90b935d1b089ec321 /fs/kernel_read_file.c | |
parent | c487216bec83b0c5a8803e5c61433d33ad7b104d (diff) | |
download | linux-a41b05edfedb939440e83666f23de3ef9af33acf.tar.xz |
SUNRPC/auth: async tasks mustn't block waiting for memory
When memory is short, new worker threads cannot be created and we depend
on the minimum one rpciod thread to be able to handle everything. So it
must not block waiting for memory.
mempools are particularly a problem as memory can only be released back
to the mempool by an async rpc task running. If all available workqueue
threads are waiting on the mempool, no thread is available to return
anything.
lookup_cred() can block on a mempool or kmalloc - and this can cause
deadlocks. So add a new RPCAUTH_LOOKUP flag for async lookups and don't
block on memory. If the -ENOMEM gets back to call_refreshresult(), wait
a short while and try again. HZ>>4 is chosen as it is used elsewhere
for -ENOMEM retries.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/kernel_read_file.c')
0 files changed, 0 insertions, 0 deletions