From 4d89dc6ab2711258bfd12c72d753f3ad56b244e2 Mon Sep 17 00:00:00 2001 From: Nadia Derbey Date: Tue, 29 Apr 2008 01:00:40 -0700 Subject: ipc: scale msgmni to the number of ipc namespaces Since all the namespaces see the same amount of memory (the total one) this patch introduces a new variable that counts the ipc namespaces and divides msg_ctlmni by this counter. Signed-off-by: Nadia Derbey Cc: Yasunori Goto Cc: Matt Helsley Cc: Mingming Cao Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- ipc/util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ipc/util.c') diff --git a/ipc/util.c b/ipc/util.c index cb017c7b9370..c27f0e92f489 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -52,6 +52,9 @@ struct ipc_namespace init_ipc_ns = { }, }; +atomic_t nr_ipc_ns = ATOMIC_INIT(1); + + /** * ipc_init - initialise IPC subsystem * -- cgit v1.2.3-59-g8ed1b