[S] Change in ...nfs-ganesha[next]: Idmapper: Limit max user-cache entries, and add a fifo queue
by Dipit Grover (GerritHub)
Dipit Grover has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1177641?usp=email )
Change subject: Idmapper: Limit max user-cache entries, and add a fifo queue
......................................................................
Idmapper: Limit max user-cache entries, and add a fifo queue
This change limits the max number of user entries in the cache.
The limit is configurable through the DIRECTORY_SERVICES
section in Ganesha config.
The cache eviction strategy is determined using the fifo queue.
The fifo queue order mimics the order of expiration time of the
cache entries, since expiration time is a linear function of
the insertion time --
expiration_time = insertion_time + cache_validity (constant)
The head of the queue therefore contains the entry with least
time-validity, and the tail of the queue contains the entry
with most time-validity. The eviction happens from the head,
and insertion happens at the tail.
Change-Id: I78c4544f3b430b1d0be16de766ce5c1def3f79ba
Signed-off-by: Dipit Grover <dipit(a)google.com>
---
M src/doc/man/ganesha-core-config.rst
M src/idmapper/idmapper_cache.c
M src/include/gsh_config.h
M src/support/nfs_read_conf.c
4 files changed, 42 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/41/1177641/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1177641?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I78c4544f3b430b1d0be16de766ce5c1def3f79ba
Gerrit-Change-Number: 1177641
Gerrit-PatchSet: 1
Gerrit-Owner: Dipit Grover <dipitgrover(a)gmail.com>