)]}'
{
  "commit": "78986a678f6ec3759a01976749f4437d8bf2d6c3",
  "tree": "ec3a4f4d3fe5a40f8809657341ad34a9fc8eb61c",
  "parents": [
    "ceddc3a52d783fabbf1ba623601419b9d6337194"
  ],
  "author": {
    "name": "Mel Gorman",
    "email": "mel@csn.ul.ie",
    "time": "Mon Sep 21 17:03:02 2009 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Sep 22 07:17:38 2009 -0700"
  },
  "message": "page-allocator: limit the number of MIGRATE_RESERVE pageblocks per zone\n\nAfter anti-fragmentation was merged, a bug was reported whereby devices\nthat depended on high-order atomic allocations were failing.  The solution\nwas to preserve a property in the buddy allocator which tended to keep the\nminimum number of free pages in the zone at the lower physical addresses\nand contiguous.  To preserve this property, MIGRATE_RESERVE was introduced\nand a number of pageblocks at the start of a zone would be marked\n\"reserve\", the number of which depended on min_free_kbytes.\n\nAnti-fragmentation works by avoiding the mixing of page migratetypes\nwithin the same pageblock.  One way of helping this is to increase\nmin_free_kbytes because it becomes less like that it will be necessary to\nplace pages of of MIGRATE_RESERVE is unbounded, the free memory is kept\nthere in large contiguous blocks instead of helping anti-fragmentation as\nmuch as it should.  With the page-allocator tracepoint patches applied, it\nwas found during anti-fragmentation tests that the number of\nfragmentation-related events were far higher than expected even with\nmin_free_kbytes at higher values.\n\nThis patch limits the number of MIGRATE_RESERVE blocks that exist per zone\nto two.  For example, with a sufficient min_free_kbytes, 4MB of memory\nwill be kept aside on an x86-64 and remain more or less free and\ncontiguous for the systems uptime.  This should be sufficient for devices\ndepending on high-order atomic allocations while helping fragmentation\ncontrol when min_free_kbytes is tuned appropriately.  As side-effect of\nthis patch is that the reserve variable is converted to int as unsigned\nlong was the wrong type to use when ensuring that only the required number\nof reserve blocks are created.\n\nWith the patches applied, fragmentation-related events as measured by the\npage allocator tracepoints were significantly reduced when running some\nfragmentation stress-tests on systems with min_free_kbytes tuned to a\nvalue appropriate for hugepage allocations at runtime.  On x86, the events\nrecorded were reduced by 99.8%, on x86-64 by 99.72% and on ppc64 by\n99.83%.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: \u003cstable@kernel.org\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": "4c847cc57cafdcac5d56a808a13c796d31cc1e51",
      "old_mode": 33188,
      "old_path": "mm/page_alloc.c",
      "new_id": "33b1a4762a7bb07a22b65ccda65ef4bd738dccac",
      "new_mode": 33188,
      "new_path": "mm/page_alloc.c"
    }
  ]
}
