OSDN Git Service

nfsd: fix performance-limiting session calculation
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Feb 2019 15:47:00 +0000 (10:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:33:36 +0000 (09:33 +0200)
commitcdc106c6c37f70fa944af4b7008367ace8876542
tree5b6a6d60c0cdbeab81aec0f48d058ddf0fafbd78
parent6d548079fce3fd78770c045772f1370b0d1ce9d4
nfsd: fix performance-limiting session calculation

[ Upstream commit c54f24e338ed2a35218f117a4a1afb5f9e2b4e64 ]

We're unintentionally limiting the number of slots per nfsv4.1 session
to 10.  Often more than 10 simultaneous RPCs are needed for the best
performance.

This calculation was meant to prevent any one client from using up more
than a third of the limit we set for total memory use across all clients
and sessions.  Instead, it's limiting the client to a third of the
maximum for a single session.

Fix this.

Reported-by: Chris Tracy <ctracy@engr.scu.edu>
Cc: stable@vger.kernel.org
Fixes: de766e570413 "nfsd: give out fewer session slots as limit approaches"
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c