)]}'
{
  "commit": "f7bf3df8be72d98afa84f5ff183e14c1ba1e560d",
  "tree": "7946f8b139da1690508f11347929a9bd31f12429",
  "parents": [
    "48dea404ed01869313f1908cca8a15774dcd8ee5"
  ],
  "author": {
    "name": "Nadia Derbey",
    "email": "Nadia.Derbey@bull.net",
    "time": "Tue Apr 29 01:00:39 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Apr 29 08:06:12 2008 -0700"
  },
  "message": "ipc: scale msgmni to the amount of lowmem\n\nOn large systems we\u0027d like to allow a larger number of message queues.  In\nsome cases up to 32K.  However simply setting MSGMNI to a larger value may\ncause problems for smaller systems.\n\nThe first patch of this series introduces a default maximum number of message\nqueue ids that scales with the amount of lowmem.\n\nSince msgmni is per namespace and there is no amount of memory dedicated to\neach namespace so far, the second patch of this series scales msgmni to the\nnumber of ipc namespaces too.\n\nSince msgmni depends on the amount of memory, it becomes necessary to\nrecompute it upon memory add/remove.  In the 4th patch, memory hotplug\nmanagement is added: a notifier block is registered into the memory hotplug\nnotifier chain for the ipc subsystem.  Since the ipc namespaces are not linked\ntogether, they have their own notification chain: one notifier_block is\ndefined per ipc namespace.  Each time an ipc namespace is created (removed) it\nregisters (unregisters) its notifier block in (from) the ipcns chain.  The\ncallback routine registered in the memory chain invokes the ipcns notifier\nchain with the IPCNS_MEMCHANGE event.  Each callback routine registered in the\nipcns namespace, in turn, recomputes msgmni for the owning namespace.\n\nThe 5th patch makes it possible to keep the memory hotplug notifier chain\u0027s\nlock for a lesser amount of time: instead of directly notifying the ipcns\nnotifier chain upon memory add/remove, a work item is added to the global\nworkqueue.  When activated, this work item is the one who notifies the ipcns\nnotifier chain.\n\nSince msgmni depends on the number of ipc namespaces, it becomes necessary to\nrecompute it upon ipc namespace creation / removal.  The 6th patch uses the\nipc namespace notifier chain for that purpose: that chain is notified each\ntime an ipc namespace is created or removed.  This makes it possible to\nrecompute msgmni for all the namespaces each time one of them is created or\nremoved.\n\nWhen msgmni is explicitely set from userspace, we should avoid recomputing it\nupon memory add/remove or ipcns creation/removal.  This is what the 7th patch\ndoes: it simply unregisters the ipcns callback routine as soon as msgmni has\nbeen changed from procfs or sysctl().\n\nEven if msgmni is set by hand, it should be possible to make it back\nautomatically recomputed upon memory add/remove or ipcns creation/removal.\nThis what is achieved in patch 8: if set to a negative value, msgmni is added\nback to the ipcns notifier chain, making it automatically recomputed again.\n\nThis patch:\n\nCompute msg_ctlmni to make it scale with the amount of lowmem.  msg_ctlmni is\nnow set to make the message queues occupy 1/32 of the available lowmem.\n\nSome cleaning has also been done for the MSGPOOL constant: the msgctl man page\nsays it\u0027s not used, but it also defines it as a size in bytes (the code\nexpresses it in Kbytes).\n\nSigned-off-by: Nadia Derbey \u003cNadia.Derbey@bull.net\u003e\nCc: Yasunori Goto \u003cy-goto@jp.fujitsu.com\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Mingming Cao \u003ccmm@us.ibm.com\u003e\nCc: Pierre Peiffer \u003cpierre.peiffer@bull.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "10a3d5a1abffb30fd9b158148b26379416cd1fe0",
      "old_mode": 33188,
      "old_path": "include/linux/msg.h",
      "new_id": "6f3b8e79a9912c0aa4a5d06e1d07742387fd1346",
      "new_mode": 33188,
      "new_path": "include/linux/msg.h"
    },
    {
      "type": "modify",
      "old_id": "805ee08ec8bbb87259cfe60dac70b698068a59d5",
      "old_mode": 33188,
      "old_path": "ipc/msg.c",
      "new_id": "9e7211122e27eb5b8dd8772a13193a4dd076a046",
      "new_mode": 33188,
      "new_path": "ipc/msg.c"
    }
  ]
}
