)]}'
{
  "commit": "f5bf18fa22f8c41a13eb8762c7373eb3a93a7333",
  "tree": "3da24eb0edae3563c1937088b72a413e7026fdec",
  "parents": [
    "f0cb3c76ae1ced85f9034480b1b24cd96530ec78"
  ],
  "author": {
    "name": "Nishanth Aravamudan",
    "email": "nacc@linux.vnet.ibm.com",
    "time": "Wed Mar 21 16:34:07 2012 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Mar 21 17:54:58 2012 -0700"
  },
  "message": "bootmem/sparsemem: remove limit constraint in alloc_bootmem_section\n\nWhile testing AMS (Active Memory Sharing) / CMO (Cooperative Memory\nOvercommit) on powerpc, we tripped the following:\n\n  kernel BUG at mm/bootmem.c:483!\n  cpu 0x0: Vector: 700 (Program Check) at [c000000000c03940]\n      pc: c000000000a62bd8: .alloc_bootmem_core+0x90/0x39c\n      lr: c000000000a64bcc: .sparse_early_usemaps_alloc_node+0x84/0x29c\n      sp: c000000000c03bc0\n     msr: 8000000000021032\n    current \u003d 0xc000000000b0cce0\n    paca    \u003d 0xc000000001d80000\n      pid   \u003d 0, comm \u003d swapper\n  kernel BUG at mm/bootmem.c:483!\n  enter ? for help\n  [c000000000c03c80] c000000000a64bcc\n  .sparse_early_usemaps_alloc_node+0x84/0x29c\n  [c000000000c03d50] c000000000a64f10 .sparse_init+0x12c/0x28c\n  [c000000000c03e20] c000000000a474f4 .setup_arch+0x20c/0x294\n  [c000000000c03ee0] c000000000a4079c .start_kernel+0xb4/0x460\n  [c000000000c03f90] c000000000009670 .start_here_common+0x1c/0x2c\n\nThis is\n\n        BUG_ON(limit \u0026\u0026 goal + size \u003e limit);\n\nand after some debugging, it seems that\n\n\tgoal \u003d 0x7ffff000000\n\tlimit \u003d 0x80000000000\n\nand sparse_early_usemaps_alloc_node -\u003e\nsparse_early_usemaps_alloc_pgdat_section calls\n\n\treturn alloc_bootmem_section(usemap_size() * count, section_nr);\n\nThis is on a system with 8TB available via the AMS pool, and as a quirk\nof AMS in firmware, all of that memory shows up in node 0.  So, we end\nup with an allocation that will fail the goal/limit constraints.\n\nIn theory, we could \"fall-back\" to alloc_bootmem_node() in\nsparse_early_usemaps_alloc_node(), but since we actually have HOTREMOVE\ndefined, we\u0027ll BUG_ON() instead.  A simple solution appears to be to\nunconditionally remove the limit condition in alloc_bootmem_section,\nmeaning allocations are allowed to cross section boundaries (necessary\nfor systems of this size).\n\nJohannes Weiner pointed out that if alloc_bootmem_section() no longer\nguarantees section-locality, we need check_usemap_section_nr() to print\npossible cross-dependencies between node descriptors and the usemaps\nallocated through it.  That makes the two loops in\nsparse_early_usemaps_alloc_node() identical, so re-factor the code a\nbit.\n\n[akpm@linux-foundation.org: code simplification]\nSigned-off-by: Nishanth Aravamudan \u003cnacc@us.ibm.com\u003e\nCc: Dave Hansen \u003chaveblue@us.ibm.com\u003e\nCc: Anton Blanchard \u003canton@au1.ibm.com\u003e\nCc: Paul Mackerras \u003cpaulus@samba.org\u003e\nCc: Ben Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: Robert Jennings \u003crcj@linux.vnet.ibm.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: \u003cstable@vger.kernel.org\u003e\t[3.3.1]\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": "668e94df8cf23ab1fa68ab54ff0cd8542a4c460c",
      "old_mode": 33188,
      "old_path": "mm/bootmem.c",
      "new_id": "0131170c9d540a572c7b2ba3108ca5c2d9db30b7",
      "new_mode": 33188,
      "new_path": "mm/bootmem.c"
    },
    {
      "type": "modify",
      "old_id": "61d7cde23111e91714dde8fe42e461a3f39c3f0d",
      "old_mode": 33188,
      "old_path": "mm/sparse.c",
      "new_id": "a8bc7d364deb0a764cbd28956f1853fbb3ce421c",
      "new_mode": 33188,
      "new_path": "mm/sparse.c"
    }
  ]
}
