summaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorRik van Riel <riel@surriel.com>2023-01-27 19:46:51 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2023-01-28 01:08:00 +0100
commitda27f796a832122ee533c7685438dad1c4e338dd (patch)
treef65cbf61db048942e78fc877732d60be814eebb0 /ipc/mqueue.c
parentipc,namespace: make ipc namespace allocation wait for pending free (diff)
downloadlinux-da27f796a832122ee533c7685438dad1c4e338dd.tar.xz
linux-da27f796a832122ee533c7685438dad1c4e338dd.zip
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 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index d09aa1c1e3e6..6c5bf7cce7fe 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1709,11 +1709,6 @@ void mq_clear_sbinfo(struct ipc_namespace *ns)
ns->mq_mnt->mnt_sb->s_fs_info = NULL;
}
-void mq_put_mnt(struct ipc_namespace *ns)
-{
- kern_unmount(ns->mq_mnt);
-}
-
static int __init init_mqueue_fs(void)
{
int error;