summaryrefslogtreecommitdiffstats
path: root/fs/afs/fsclient.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-03-27 15:02:44 +0000
committerDavid Howells <dhowells@redhat.com>2020-05-31 15:19:51 +0100
commit8230fd8217b7ea76f838ae88e4a5a8e54f37099f (patch)
treec395ba533ee29c24e1ce7e4c0b9f65f8b14e0972 /fs/afs/fsclient.c
parent6d043a578265e8c24384648f9c74c8874b429f28 (diff)
downloadlinux-8230fd8217b7ea76f838ae88e4a5a8e54f37099f.tar.bz2
afs: Make callback processing more efficient.
afs_vol_interest objects represent the volume IDs currently being accessed from a fileserver. These hold lists of afs_cb_interest objects that repesent the superblocks using that volume ID on that server. When a callback notification from the server telling of a modification by another client arrives, the volume ID specified in the notification is looked up in the server's afs_vol_interest list. Through the afs_cb_interest list, the relevant superblocks can be iterated over and the specific inode looked up and marked in each one. Make the following efficiency improvements: (1) Hold rcu_read_lock() over the entire processing rather than locking it each time. (2) Do all the callbacks for each vid together rather than individually. Each volume then only needs to be looked up once. (3) afs_vol_interest objects are now stored in an rb_tree rather than a flat list to reduce the lookup step count. (4) afs_vol_interest lookup is now done with RCU, but because it's in an rb_tree which may rotate under us, a seqlock is used so that if it changes during the walk, we repeat the walk with a lock held. With this and the preceding patch which adds RCU-based lookups in the inode cache, target volumes/vnodes can be taken without the need to take any locks, except on the target itself. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/fsclient.c')
0 files changed, 0 insertions, 0 deletions