Whamcloud - gitweb
LU-16498 obdclass: change uc_lock to rwlock 95/52395/13
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 14 Sep 2023 16:00:04 +0000 (18:00 +0200)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:06:10 +0000 (07:06 +0000)
commitc7833db8e0bbed29908d5ec00dccc2a5ddac5305
tree1eba20014412f8d5cf8a8fd29e58a55b13b7e5c0
parent50baa82e334c7e5c2323d6e01309d922d67e01fd
LU-16498 obdclass: change uc_lock to rwlock

Change the upcall cache uc_lock to a read-write lock so that threads
can get the read lock to do concurrent lookups in the upcall cache,
and only grab the write lock in the rare case when a new entry is
added or old entries are expired. That reduces serialization between
server threads during normal operation, and avoids all of the threads
spinning for some time if the requested key (UID or gss context) is
not in the cache at all, before they sleep.

Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I812400104fd2115d19386fb4a03bb3ce99c49383
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52395
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/upcall_cache.h
lustre/obdclass/upcall_cache.c