aboutsummaryrefslogtreecommitdiff
path: root/ipc/util.h
diff options
context:
space:
mode:
authorNadia Derbey <Nadia.Derbey@bull.net>2008-04-29 01:00:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 08:06:12 -0700
commitb6b337ad1c1d6fe11b09b35d75464b84b3e11f07 (patch)
treedf174a23a827cc43db76900d1ddbbef3ac9ddc90 /ipc/util.h
parent0c40ba4fd64f98e7a5cba8ffaedbd68642a85700 (diff)
ipc: recompute msgmni on memory add / remove
Introduce the registration of a callback routine that recomputes msg_ctlmni upon memory add / remove. A single notifier block is registered in the hotplug memory chain for all the ipc namespaces. Since the ipc namespaces are not linked together, they have their own notification chain: one notifier_block is defined per ipc namespace. Each time an ipc namespace is created (removed) it registers (unregisters) its notifier block in (from) the ipcns chain. The callback routine registered in the memory chain invokes the ipcns notifier chain with the IPCNS_LOWMEM event. Each callback routine registered in the ipcns namespace, in turn, recomputes msgmni for the owning namespace. Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Matt Helsley <matthltc@us.ibm.com> Cc: Mingming Cao <cmm@us.ibm.com> Cc: Pierre Peiffer <pierre.peiffer@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/util.h')
-rw-r--r--ipc/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/util.h b/ipc/util.h
index f37d160c98f..0e3d79037a2 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -124,6 +124,8 @@ extern void free_msg(struct msg_msg *msg);
extern struct msg_msg *load_msg(const void __user *src, int len);
extern int store_msg(void __user *dest, struct msg_msg *msg, int len);
+extern void recompute_msgmni(struct ipc_namespace *);
+
static inline int ipc_buildid(int id, int seq)
{
return SEQ_MULTIPLIER * seq + id;