2022-03-16 13:59:32

by Trond Myklebust

[permalink] [raw]
Subject: Re: [PATCH] NFS: Fix memory allocation in rpc_malloc()

On Tue, 2022-03-15 at 16:50 +0000, Chuck Lever III wrote:
>
>
> > On Mar 15, 2022, at 12:20 PM, [email protected] wrote:
> >
> > From: Trond Myklebust <[email protected]>
> >
> > When allocating memory, it should be safe to always use GFP_KERNEL,
> > since both swap tasks and asynchronous tasks will regulate the
> > allocation mode through the struct task flags.
>
> Is a similar change necessary in xprt_rdma_allocate() ?

It looks to me as if that would be a safe change, and we should
probably also change that definition of RPCRDMA_DEF_GFP to match
GFP_KERNEL.



--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]