]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfsd: increase DRC cache limit
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 20 Sep 2017 00:51:31 +0000 (20:51 -0400)
committerBrian Maly <brian.maly@oracle.com>
Tue, 21 Aug 2018 18:41:04 +0000 (14:41 -0400)
commit37e45c957b29de78b66a410dc93b63fe03f399a2
treec84ee1a926c1fabd838a90189b8c9a99403cfc41
parent133e51d2b12c1b619f56f54a76698dfcf23ed1a5
nfsd: increase DRC cache limit

An NFSv4.1+ client negotiates the size of its duplicate reply cache size
in the initial CREATE_SESSION request.  The server preallocates the
memory for the duplicate reply cache to ensure that we'll never fail to
record the response to a nonidempotent operation.

To prevent a few CREATE_SESSIONs from consuming all of memory we set an
upper limit based on nr_free_buffer_pages().  1/2^10 has been too
limiting in practice; 1/2^7 is still less than one percent.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
(cherry picked from commit 44d8660d3bb0a1c8363ebcb906af2343ea8e15f6)

Orabug: 28023821
Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
Reviewed-by: Calum Mackay <calum.mackay@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
fs/nfsd/nfssvc.c