]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: dynamically allocate DRC entries
authorJeff Layton <jlayton@redhat.com>
Mon, 4 Feb 2013 13:18:02 +0000 (08:18 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 4 Feb 2013 22:19:10 +0000 (17:19 -0500)
commit6277f28bff7a2bd0fc20f933aee9aa58c3f35d01
tree4a42757386eab303fd723bcfbcadf843c921ebc8
parent884a68231a8a1b7abfc0e53ae27463ef84d4b466
nfsd: dynamically allocate DRC entries

The existing code keeps a fixed-size cache of 1024 entries. This is much
too small for a busy server, and wastes memory on an idle one.  This
patch changes the code to dynamically allocate and free these cache
entries.

A cap on the number of entries is retained, but it's much larger than
the existing value and now scales with the amount of low memory in the
machine.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfscache.c