summaryrefslogtreecommitdiff
path: root/include/linux/mount.h
diff options
context:
space:
mode:
authorRik van Riel <riel@surriel.com>2023-01-27 21:46:51 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2023-01-28 03:08:00 +0300
commitda27f796a832122ee533c7685438dad1c4e338dd (patch)
treef65cbf61db048942e78fc877732d60be814eebb0 /include/linux/mount.h
parenta80c4adcb574821e534779c48ae13953b7d1d996 (diff)
downloadlinux-da27f796a832122ee533c7685438dad1c4e338dd.tar.xz
ipc,namespace: batch free ipc_namespace structures
Instead of waiting for an RCU grace period between each ipc_namespace structure that is being freed, wait an RCU grace period for every batch of ipc_namespace structures. Thanks to Al Viro for the suggestion of the helper function. This speeds up the run time of the test case that allocates ipc_namespaces in a loop from 6 minutes, to a little over 1 second: real 0m1.192s user 0m0.038s sys 0m1.152s Signed-off-by: Rik van Riel <riel@surriel.com> Reported-by: Chris Mason <clm@meta.com> Tested-by: Giuseppe Scrivano <gscrivan@redhat.com> Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r--include/linux/mount.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 62475996fac6..ec55a031aa8c 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -88,6 +88,7 @@ extern void mnt_drop_write(struct vfsmount *mnt);
extern void mnt_drop_write_file(struct file *file);
extern void mntput(struct vfsmount *mnt);
extern struct vfsmount *mntget(struct vfsmount *mnt);
+extern void mnt_make_shortterm(struct vfsmount *mnt);
extern struct vfsmount *mnt_clone_internal(const struct path *path);
extern bool __mnt_is_readonly(struct vfsmount *mnt);
extern bool mnt_may_suid(struct vfsmount *mnt);