提交 a0a1d50c 编写于 作者: C Chuck Lever 提交者: Anna Schumaker

xprtrdma: Update the GFP flags used in xprt_rdma_allocate()

Reflect the more conservative approach used in the socket transport's
version of this transport method. An RPC buffer allocation should
avoid forcing not just FS activity, but any I/O.

In particular, two recent changes missed updating xprtrdma:

 - Commit c6c8fe79 ("net, sunrpc: suppress allocation warning ...")
 - Commit a564b8f0 ("nfs: enable swap on NFS")
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 df515ca7
......@@ -463,13 +463,16 @@ xprt_rdma_allocate(struct rpc_task *task, size_t size)
struct rpcrdma_regbuf *rb;
struct rpcrdma_req *req;
size_t min_size;
gfp_t flags = task->tk_flags & RPC_TASK_SWAPPER ?
GFP_ATOMIC : GFP_NOFS;
gfp_t flags;
req = rpcrdma_buffer_get(&r_xprt->rx_buf);
if (req == NULL)
return NULL;
flags = GFP_NOIO | __GFP_NOWARN;
if (RPC_IS_SWAPPER(task))
flags = __GFP_MEMALLOC | GFP_NOWAIT | __GFP_NOWARN;
if (req->rl_rdmabuf == NULL)
goto out_rdmabuf;
if (req->rl_sendbuf == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册