OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-564-gf98e844
Gerrit Code Review
gerrit@openafs.org
Fri, 1 Nov 2024 12:45:16 -0400
The following commit has been merged in the master branch:
commit f98e84458caeadd35b9acd98f6d6ced3f89382cf
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Tue May 24 13:03:51 2022 +0000
afs: Convert afs_vhashT to use struct afs_q
Because the afs_vhashT hash table uses singly-linked lists in its hash
buckets, to remove an entry we have to:
1. Find the bucket where the entry to be removed should be present.
2. Go through each element of this bucket until we find this entry.
3. Remove it.
Due to step number 2, the time required to remove an entry from a bucket
increases as the linked list associated with this bucket gets longer.
This can get particularly bad when evicting vcaches (ShakeLooseVCaches),
as each entry from the least recently used queue (VLRU) has to be found
in our afs_vhashT hash table. This problem is exacerbated when files are
repeatedly deleted and recreated in the same volume, resulting in many
vcaches with the same volume id and vnode number (but different unique
ids) in the same bucket.
To avoid this problem, build afs_vhashT using doubly-linked lists with
'struct afs_q', like we did for afs_vhashTV in commit 4fc48af8
(vc-hashing-be-less-expensive-20050728). Now, removing a vcache from
afs_vhashT is an O(1) operation (QRemove).
Change-Id: I5a1a9a090f9aa3d8884e2bb12aca1f1acc3b902d
Reviewed-on: https://gerrit.openafs.org/14949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
src/afs/LINUX/osi_vfsops.c | 4 +-
src/afs/afs.h | 5 ++-
src/afs/afs_callback.c | 32 ++++++++++++----
src/afs/afs_cbqueue.c | 12 +++++-
src/afs/afs_disconnected.c | 32 ++++------------
src/afs/afs_server.c | 5 ++-
src/afs/afs_user.c | 11 +++++-
src/afs/afs_vcache.c | 95 +++++++++++++++++++++++++++++++---------------
src/afs/afs_volume.c | 5 ++-
9 files changed, 130 insertions(+), 71 deletions(-)
--
OpenAFS Master Repository