Dipit Grover has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1177651?usp=email ) Change subject: Idmapper: Limit max user-groups cache entries, and add a fifo queue ...................................................................... Idmapper: Limit max user-groups cache entries, and add a fifo queue This change limits the max number of user-groups entries in the uid2grp 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: I8dae2b3597bc6604328dd6699d24eb128544fb93 Signed-off-by: Dipit Grover <dipit@google.com> --- M src/doc/man/ganesha-core-config.rst M src/include/gsh_config.h M src/support/nfs_read_conf.c M src/support/uid2grp_cache.c 4 files changed, 52 insertions(+), 18 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/51/1177651/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1177651?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: I8dae2b3597bc6604328dd6699d24eb128544fb93 Gerrit-Change-Number: 1177651 Gerrit-PatchSet: 1 Gerrit-Owner: Dipit Grover <dipitgrover@gmail.com>