]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
nfsd: increase DRC cache limit
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 20 Sep 2017 00:51:31 +0000 (20:51 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 4 Oct 2017 20:25:01 +0000 (16:25 -0400)
commit44d8660d3bb0a1c8363ebcb906af2343ea8e15f6
treeae880e4bda7d39b6e4162e05db962b59e85bedc3
parent9542446048e01871fd323cba9a1d468b46cfceea
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>
fs/nfsd/nfssvc.c