• J. Bruce Fields's avatar
    nfsd: increase DRC cache limit · dbd040b4
    J. Bruce Fields authored
    [ Upstream commit 44d8660d ]
    
    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: default avatarJ. Bruce Fields <bfields@redhat.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    dbd040b4
nfssvc.c 20.9 KB