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 <[email protected]>
Cc: Yasunori Goto <[email protected]>
Cc: Matt Helsley <[email protected]>
Cc: Mingming Cao <[email protected]>
Cc: Pierre Peiffer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Nadia Derbey 2008-04-29 01:00:40 -07:00 • committed by Linus Torvalds
commit 4d89dc6ab2
4 changed files with 14 additions and 3 deletions

View file

@ -52,6 +52,9 @@ struct ipc_namespace init_ipc_ns = {
},
};
atomic_t nr_ipc_ns = ATOMIC_INIT(1);
/**
* ipc_init - initialise IPC subsystem
*