]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix memory allocation in rpc_malloc()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 15 Mar 2022 02:02:22 +0000 (22:02 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Mar 2022 19:52:55 +0000 (15:52 -0400)
commit053666596c76a3c8270d390aa4a2056a444ae304
tree03fce3288dbf7e4ab704cd96ccc88a6b6613f6db
parent8e7144e5ee578af39c562b239a600bbac914f975
NFS: Fix memory allocation in rpc_malloc()

When in a low memory situation, we do want rpciod to kick off direct
reclaim in the case where that helps, however we don't want it looping
forever in mempool_alloc().
So first try allocating from the slab using GFP_KERNEL | __GFP_NORETRY,
and then fall back to a GFP_NOWAIT allocation from the mempool.

Ditto for rpc_alloc_task()

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
include/linux/sunrpc/sched.h
net/sunrpc/sched.c