Skip to content

Commit ef8d36c

Browse files
J. Bruce Fieldsjfvogel
authored andcommitted
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 <[email protected]> (cherry picked from commit 44d8660) orabug: 28427489 Signed-off-by: Manjunath Patil <[email protected]> Reviewed-by: Calum Mackay <[email protected]>
1 parent 0d3f459 commit ef8d36c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfsd/nfssvc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ void nfsd_reset_versions(void)
447447
*/
448448
static void set_max_drc(void)
449449
{
450-
#define NFSD_DRC_SIZE_SHIFT 10
450+
#define NFSD_DRC_SIZE_SHIFT 7
451451
nfsd_drc_max_mem = (nr_free_buffer_pages()
452452
>> NFSD_DRC_SIZE_SHIFT) * PAGE_SIZE;
453453
nfsd_drc_mem_used = 0;

0 commit comments

Comments
 (0)