1. 29 Apr, 2008 3 commits
    • Nadia Derbey's avatar
      ipc: re-enable msgmni automatic recomputing msgmni if set to negative · 6546bc42
      Nadia Derbey authored
      
      The enhancement as asked for by Yasunori: if msgmni is set to a negative
      value, register it back into the ipcns notifier chain.
      
      A new interface has been added to the notification mechanism:
      notifier_chain_cond_register() registers a notifier block only if not already
      registered.  With that new interface we avoid taking care of the states
      changes in procfs.
      Signed-off-by: default avatarNadia 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6546bc42
    • Nadia Derbey's avatar
      ipc: recompute msgmni on ipc namespace creation/removal · e2c284d8
      Nadia Derbey authored
      
      Introduce a notification mechanism that aims at recomputing msgmni each time
      an ipc namespace is created or removed.
      
      The ipc namespace notifier chain already defined for memory hotplug management
      is used for that purpose too.
      
      Each time a new ipc namespace is allocated or an existing ipc namespace is
      removed, the ipcns notifier chain is notified.  The callback routine for each
      registered ipc namespace is then activated in order to recompute msgmni for
      that namespace.
      Signed-off-by: default avatarNadia 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e2c284d8
    • Nadia Derbey's avatar
      ipc: recompute msgmni on memory add / remove · b6b337ad
      Nadia Derbey authored
      
      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: default avatarNadia 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6b337ad