Whamcloud - gitweb
LU-16498 obdclass: change uc_lock to rwlock
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 14 Sep 2023 16:00:04 +0000 (18:00 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 13 Jan 2024 02:47:50 +0000 (02:47 +0000)
commit127128bed3dc7a69645087aaa50d6c342987366a
tree56c16a614172d10ebbce5bda1d8f68d3636998b9
parentb7ef8c3eca102f9f508e9ac96a5848d5f1490440
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.

Lustre-change: https://review.whamcloud.com/52395
Lustre-commit: TBD (from 003615a0a6711334d95c42f3c41852e1cbc8e77b)

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/ex/lustre-release/+/53622
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/upcall_cache.h
lustre/obdclass/upcall_cache.c
lustre/obdclass/upcall_cache_internal.c