diff options
author | NeilBrown <neilb@suse.de> | 2022-03-07 02:41:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-13 21:59:12 +0300 |
commit | 20700aa01bc27428e4c9ffe2a635251444dcdd17 (patch) | |
tree | 723e00070cfa1b48cc573d33c19141732f5e5255 /lib/logic_pio.c | |
parent | a19fd1d61797e0a0408537ecb97c57dd70c0045e (diff) | |
download | linux-20700aa01bc27428e4c9ffe2a635251444dcdd17.tar.xz |
SUNRPC/xprt: async tasks mustn't block waiting for memory
[ Upstream commit a721035477fb5fb8abc738fbe410b07c12af3dc5 ]
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.
xprt_dynamic_alloc_slot can block indefinitely. This can tie up all
workqueue threads and NFS can deadlock. So when called from a
workqueue, set __GFP_NORETRY.
The rdma alloc_slot already does not block. However it sets the error
to -EAGAIN suggesting this will trigger a sleep. It does not. As we
can see in call_reserveresult(), only -ENOMEM causes a sleep. -EAGAIN
causes immediate retry.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/logic_pio.c')
0 files changed, 0 insertions, 0 deletions