From: Christian Brauner Date: Fri, 13 Dec 2024 19:31:52 +0000 (+0100) Subject: Merge patch series "fs: lockless mntns lookup" X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c7bb042031b4890b1c5e733dd1ef6484565d174a;p=users%2Fwilly%2Fxarray.git Merge patch series "fs: lockless mntns lookup" Christian Brauner says: Currently we take the read lock when looking for a mount namespace to list mounts in. We can make this lockless. The simple search case can just use a sequence counter to detect concurrent changes to the rbtree. For walking the list of mount namespaces sequentially via nsfs we keep a separate rcu list as rb_prev() and rb_next() aren't usable safely with rcu. Since creating mount namespaces is a relatively rare event compared with querying mounts in a foreign mount namespace this is worth it. Once libmount and systemd pick up this mechanism to list mounts in foreign mount namespaces this will be used very frequently. * patches from https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-0-6e3cdaf9b280@kernel.org: samples: add test-list-all-mounts selftests: remove unneeded include selftests: add tests for mntns iteration seltests: move nsfs into filesystems subfolder fs: simplify rwlock to spinlock fs: lockless mntns lookup for nsfs rculist: add list_bidir_{del,prev}_rcu() fs: lockless mntns rbtree lookup fs: add mount namespace to rbtree late mount: remove inlude/nospec.h include Link: https://lore.kernel.org/r/20241213-work-mount-rbtree-lockless-v3-0-6e3cdaf9b280@kernel.org Signed-off-by: Christian Brauner --- c7bb042031b4890b1c5e733dd1ef6484565d174a