)]}'
{
  "commit": "641c767389b19859a45e6de46d8e18cd935bdb60",
  "tree": "b3ac95aaea213823c226b181b8a301e4ae95bd9d",
  "parents": [
    "05b79bdcb48c18cd9b580c39e3efb9a1ab078151"
  ],
  "author": {
    "name": "Andy Whitcroft",
    "email": "apw@shadowen.org",
    "time": "Thu Jun 23 00:07:59 2005 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@ppc970.osdl.org",
    "time": "Thu Jun 23 09:45:05 2005 -0700"
  },
  "message": "[PATCH] sparsemem swiss cheese numa layouts\n\nThe part of the sparsemem patch which modifies memmap_init_zone() has recently\nbecome a problem.  It changes behavior so that there is a call to\npfn_to_page() for each individual page inside of a node\u0027s range:\nnode_start_pfn through node_end_pfn.  It used to simply do this once, at the\nbeginning of the node, but having sparsemem\u0027s non-contiguous mem_map[]s inside\nof a node made it necessary to change.\n\nMike Kravetz recently wrote a patch which made the NUMA code accept some new\nkinds of layouts.  The system\u0027s memory was laid out like this, with node 0\u0027s\nmemory in two pieces: one before and one after node 1\u0027s memory:\n\n\tNode 0: +++++     +++++\n\tNode 1:      +++++\n\nPrevious behavior before Mike\u0027s patch was to assign nodes like this:\n\n\tNode 0: 00000     XXXXX\n\tNode 1:      11111\n\nWhere the \u0027X\u0027 areas were simply thrown away.  The new behavior was to make the\npg_data_t span node 0 across all of its areas, including areas that are really\nnode 1\u0027s: Node 0: 000000000000000 Node 1: 11111\n\nThis wastes a little bit of mem_map space, but ends up being OK, and more\nfully utilizes the system\u0027s memory.  memmap_init_zone() initializes all of the\n\"struct page\"s for node 0, even for the \"hole\", but those never get used,\nbecause there is no pfn_to_page() that resolves to those pages.  However, only\ncalling pfn_to_page() once, memmap_init_zone() always uses the pages that were\nallocated for node0-\u003enode_mem_map because:\n\n\tstruct page *start \u003d pfn_to_page(start_pfn);\n\t// effectively start \u003d \u0026node-\u003enode_mem_map[0]\n\tfor (page \u003d start; page \u003c (start + size); page++) {\n\t\tinit_page_here();...\n\t\tpage++;\n\t}\n\nSlow, and wasteful, but generally harmless.\n\nBut, modify that to call pfn_to_page() for each loop iteration (like sparsemem\ndoes):\n\n\tfor (pfn \u003d start_pfn; pfn \u003c \u003c (start_pfn + size); pfn++++) {\n\t\tpage \u003d pfn_to_page(pfn);\n\t}\n\nAnd you end up trying to initialize node 1\u0027s pages too early, along with bogus\ndata from node 0.  This patch checks for those weird layouts and declines to\ntouch the pages, making the more frequent pfn_to_page() calls OK to do.\n\nSigned-off-by: Dave Hansen \u003chaveblue@us.ibm.com\u003e\nSigned-off-by: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "011b5c0bf1d03f1c9f1d96c8421669e6f1b7a018",
      "old_mode": 33188,
      "old_path": "arch/ppc64/Kconfig",
      "new_id": "85f8fcf44b6c728e465d4c64dd6d6325b7129027",
      "new_mode": 33188,
      "new_path": "arch/ppc64/Kconfig"
    },
    {
      "type": "modify",
      "old_id": "19860d317ec24613e217e289268f57b988b1e1c0",
      "old_mode": 33188,
      "old_path": "include/linux/mmzone.h",
      "new_id": "746b57e3d3704a76702f1b25b23d003710847b61",
      "new_mode": 33188,
      "new_path": "include/linux/mmzone.h"
    },
    {
      "type": "modify",
      "old_id": "5c1b8982a6da582897e74dfa3f69fb3102032f5b",
      "old_mode": 33188,
      "old_path": "mm/page_alloc.c",
      "new_id": "1eb683f9b3af45108132b0acc98fb01fea2428e4",
      "new_mode": 33188,
      "new_path": "mm/page_alloc.c"
    }
  ]
}
