diff options
author | Rik van Riel <riel@surriel.com> | 2023-01-27 13:46:51 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-01-27 19:08:00 -0500 |
commit | da27f796a832122ee533c7685438dad1c4e338dd (patch) | |
tree | f65cbf61db048942e78fc877732d60be814eebb0 /ipc/util.h | |
parent | a80c4adcb574821e534779c48ae13953b7d1d996 (diff) | |
download | linux-stable-da27f796a832122ee533c7685438dad1c4e338dd.tar.gz linux-stable-da27f796a832122ee533c7685438dad1c4e338dd.tar.bz2 linux-stable-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/util.h')
-rw-r--r-- | ipc/util.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ipc/util.h b/ipc/util.h index b2906e366539..67bdd2aa2c28 100644 --- a/ipc/util.h +++ b/ipc/util.h @@ -56,10 +56,8 @@ struct pid_namespace; #ifdef CONFIG_POSIX_MQUEUE extern void mq_clear_sbinfo(struct ipc_namespace *ns); -extern void mq_put_mnt(struct ipc_namespace *ns); #else static inline void mq_clear_sbinfo(struct ipc_namespace *ns) { } -static inline void mq_put_mnt(struct ipc_namespace *ns) { } #endif #ifdef CONFIG_SYSVIPC |