1. 13 10月, 2012 1 次提交
  2. 07 6月, 2008 1 次提交
  3. 29 4月, 2008 1 次提交
    • N
      ipc: scale msgmni to the amount of lowmem · f7bf3df8
      Nadia Derbey 提交于
      On large systems we'd like to allow a larger number of message queues.  In
      some cases up to 32K.  However simply setting MSGMNI to a larger value may
      cause problems for smaller systems.
      
      The first patch of this series introduces a default maximum number of message
      queue ids that scales with the amount of lowmem.
      
      Since msgmni is per namespace and there is no amount of memory dedicated to
      each namespace so far, the second patch of this series scales msgmni to the
      number of ipc namespaces too.
      
      Since msgmni depends on the amount of memory, it becomes necessary to
      recompute it upon memory add/remove.  In the 4th patch, memory hotplug
      management is added: a notifier block is registered into the memory hotplug
      notifier chain for the ipc subsystem.  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_MEMCHANGE event.  Each callback routine registered in the
      ipcns namespace, in turn, recomputes msgmni for the owning namespace.
      
      The 5th patch makes it possible to keep the memory hotplug notifier chain's
      lock for a lesser amount of time: instead of directly notifying the ipcns
      notifier chain upon memory add/remove, a work item is added to the global
      workqueue.  When activated, this work item is the one who notifies the ipcns
      notifier chain.
      
      Since msgmni depends on the number of ipc namespaces, it becomes necessary to
      recompute it upon ipc namespace creation / removal.  The 6th patch uses the
      ipc namespace notifier chain for that purpose: that chain is notified each
      time an ipc namespace is created or removed.  This makes it possible to
      recompute msgmni for all the namespaces each time one of them is created or
      removed.
      
      When msgmni is explicitely set from userspace, we should avoid recomputing it
      upon memory add/remove or ipcns creation/removal.  This is what the 7th patch
      does: it simply unregisters the ipcns callback routine as soon as msgmni has
      been changed from procfs or sysctl().
      
      Even if msgmni is set by hand, it should be possible to make it back
      automatically recomputed upon memory add/remove or ipcns creation/removal.
      This what is achieved in patch 8: if set to a negative value, msgmni is added
      back to the ipcns notifier chain, making it automatically recomputed again.
      
      This patch:
      
      Compute msg_ctlmni to make it scale with the amount of lowmem.  msg_ctlmni is
      now set to make the message queues occupy 1/32 of the available lowmem.
      
      Some cleaning has also been done for the MSGPOOL constant: the msgctl man page
      says it's not used, but it also defines it as a size in bytes (the code
      expresses it in Kbytes).
      Signed-off-by: NNadia 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: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f7bf3df8
  4. 20 10月, 2007 1 次提交
    • N
      ipc: store ipcs into IDRs · 7ca7e564
      Nadia Derbey 提交于
      This patch introduces ipcs storage into IDRs. The main changes are:
        . This ipc_ids structure is changed: the entries array is changed into a
          root idr structure.
        . The grow_ary() routine is removed: it is not needed anymore when adding
          an ipc structure, since we are now using the IDR facility.
        . The ipc_rmid() routine interface is changed:
             . there is no need for this routine to return the pointer passed in as
               argument: it is now declared as a void
             . since the id is now part of the kern_ipc_perm structure, no need to
               have it as an argument to the routine
      Signed-off-by: NNadia Derbey <Nadia.Derbey@bull.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7ca7e564
  5. 08 12月, 2006 1 次提交
    • S
      [PATCH] Fix the size limit of compat space msgsize · 651971cb
      suzuki 提交于
      Currently we allocate 64k space on the user stack and use it the msgbuf for
      sys_{msgrcv,msgsnd} for compat and the results are later copied in user [
      by copy_in_user].  This patch introduces helper routines for
      sys_{msgrcv,msgsnd} as below:
      
      do_msgsnd() : Accepts the mtype and user space ptr to the buffer along with
      the msqid and msgflg.
      
      do_msgrcv() : Accepts a kernel space ptr to mtype and a userspace ptr to
      the buffer.  The mtype has to be copied back the user space msgbuf by the
      caller.
      
      These changes avoid the need to allocate the msgsize on the userspace (
      thus removing the size limt ) and the overhead of an extra copy_in_user().
      Signed-off-by: NSuzuki K P <suzuki@in.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      651971cb
  6. 25 4月, 2006 1 次提交
  7. 08 9月, 2005 1 次提交
  8. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4