]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: MR-related memory allocation should be allowed to fail
authorChuck Lever <chuck.lever@oracle.com>
Fri, 23 Sep 2022 13:06:24 +0000 (09:06 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 5 Oct 2022 19:47:16 +0000 (15:47 -0400)
commit5126bc3ab37127df67abe1d161ee68ccb4f4b91b
treef57b26b0a0876594934d5b8026a7a0bb0d51f834
parenta92977aeb0f54f3bf9f3b58460690c3465cedb27
xprtrdma: MR-related memory allocation should be allowed to fail

xprtrdma always drives a retry of MR allocation if it should fail.
It should be safe to not use GFP_KERNEL for this purpose rather
than sleeping in the memory allocator.

In theory, if these weaker allocations are attempted first, memory
exhaustion is likely to cause xprtrdma to fail fast and not then
invoke the RDMA core APIs, which still might use GFP_KERNEL.

Also note that rpc_task_gfp_mask() always sets __GFP_NORETRY and
__GFP_NOWARN when an RPC-related allocation is being done in a
worker thread. MR allocation is already always done in worker
threads.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h