Whamcloud - gitweb
LU-16498 obdclass: change uc_lock to rwlock 95/52395/11
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 14 Sep 2023 16:00:04 +0000 (18:00 +0200)
committerSebastien Buisson <sbuisson@ddn.com>
Mon, 20 Nov 2023 10:40:49 +0000 (11:40 +0100)
commit003615a0a6711334d95c42f3c41852e1cbc8e77b
treedcf33045109fb29334b70e4924405ee8995328d0
parent1bb972b8bf86accb5e53f0a35e64c89e5908a889
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
lustre/include/upcall_cache.h
lustre/obdclass/upcall_cache.c