diff options
author | NeilBrown <neilb@suse.de> | 2024-12-12 08:47:09 +1100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-01-06 09:37:39 -0500 |
commit | 35e34642b5996df91e2879d59f726df6072c82f9 (patch) | |
tree | b9e860e9b4c5597ca7db3eb25f36f1d3471db7ae /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7 (diff) |
nfsd: add shrinker to reduce number of slots allocated per session
Add a shrinker which frees unused slots and may ask the clients to use
fewer slots on each session.
We keep a global count of the number of freeable slots, which is the sum
of one less than the current "target" slots in all sessions in all
clients in all net-namespaces. This number is reported by the shrinker.
When the shrinker is asked to free some, we call xxx on each session in
a round-robin asking each to reduce the slot count by 1. This will
reduce the "target" so the number reported by the shrinker will reduce
immediately. The memory will only be freed later when the client
confirmed that it is no longer needed.
We use a global list of sessions and move the "head" to after the last
session that we asked to reduce, so the next callback from the shrinker
will move on to the next session. This pressure should be applied
"evenly" across all sessions over time.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions