)]}'
{
  "commit": "cc5a88ab9e86f9dc022020b2d90b8d51bc80c932",
  "tree": "953b699613758962008aa7e7fba4945005d22fea",
  "parents": [
    "d6ed972cf5323c04dd622330da80eb255a4b6aad"
  ],
  "author": {
    "name": "Mel Gorman",
    "email": "mgorman@suse.de",
    "time": "Mon Oct 08 16:32:41 2012 -0700"
  },
  "committer": {
    "name": "Ethan Chen",
    "email": "intervigil@gmail.com",
    "time": "Fri Jan 17 22:12:18 2014 -0800"
  },
  "message": "mm: compaction: cache if a pageblock was scanned and no pages were isolated\n\nWhen compaction was implemented it was known that scanning could\npotentially be excessive.  The ideal was that a counter be maintained for\neach pageblock but maintaining this information would incur a severe\npenalty due to a shared writable cache line.  It has reached the point\nwhere the scanning costs are a serious problem, particularly on\nlong-lived systems where a large process starts and allocates a large\nnumber of THPs at the same time.\n\nInstead of using a shared counter, this patch adds another bit to the\npageblock flags called PG_migrate_skip.  If a pageblock is scanned by\neither migrate or free scanner and 0 pages were isolated, the pageblock is\nmarked to be skipped in the future.  When scanning, this bit is checked\nbefore any scanning takes place and the block skipped if set.\n\nThe main difficulty with a patch like this is \"when to ignore the cached\ninformation?\" If it\u0027s ignored too often, the scanning rates will still be\nexcessive.  If the information is too stale then allocations will fail\nthat might have otherwise succeeded.  In this patch\n\no CMA always ignores the information\no If the migrate and free scanner meet then the cached information will\n  be discarded if it\u0027s at least 5 seconds since the last time the cache\n  was discarded\no If there are a large number of allocation failures, discard the cache.\n\nThe time-based heuristic is very clumsy but there are few choices for a\nbetter event.  Depending solely on multiple allocation failures still\nallows excessive scanning when THP allocations are failing in quick\nsuccession due to memory pressure.  Waiting until memory pressure is\nrelieved would cause compaction to continually fail instead of using\nreclaim/compaction to try allocate the page.  The time-based mechanism is\nclumsy but a better option is not obvious.\n\nChange-Id: I17a4887aca9bb3d2d9d3756089ad7c9b89922727\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nCc: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nCc: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nCc: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nGit-commit: bb13ffeb9f6bfeb301443994dfbf29f91117dfb3\nGit-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\n[lauraa@codeaurora.org: Context fixup due to merging patches out of order]\nSigned-off-by: Laura Abbott \u003clauraa@codeaurora.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5c65e5648192f568f7807e4522935530f1536ba4",
      "old_mode": 33188,
      "old_path": "include/linux/mmzone.h",
      "new_id": "9ae689806de117d763de25ea15b84fb97112714d",
      "new_mode": 33188,
      "new_path": "include/linux/mmzone.h"
    },
    {
      "type": "modify",
      "old_id": "19ef95d293aecbc9f23e48b0235ef47625e70536",
      "old_mode": 33188,
      "old_path": "include/linux/pageblock-flags.h",
      "new_id": "eed27f4f4c3efd1785a3e777636f52bd5642aa7e",
      "new_mode": 33188,
      "new_path": "include/linux/pageblock-flags.h"
    },
    {
      "type": "modify",
      "old_id": "0f082284f245d3019e27f02839d492d71f382def",
      "old_mode": 33188,
      "old_path": "mm/compaction.c",
      "new_id": "069caed8a8661605cd075817c5a4e3128f50b0e1",
      "new_mode": 33188,
      "new_path": "mm/compaction.c"
    },
    {
      "type": "modify",
      "old_id": "4700555decf9c8dd7d87abfb21825f870c0ae95f",
      "old_mode": 33188,
      "old_path": "mm/internal.h",
      "new_id": "b99a6942eaa517f845f76c6d2189d6088a12e397",
      "new_mode": 33188,
      "new_path": "mm/internal.h"
    },
    {
      "type": "modify",
      "old_id": "6095553cfd449f850841f2ccd8ffd17f4d53097a",
      "old_mode": 33188,
      "old_path": "mm/page_alloc.c",
      "new_id": "8ef135b6ee2e54949573292af848c6793b333170",
      "new_mode": 33188,
      "new_path": "mm/page_alloc.c"
    }
  ]
}
