)]}'
{
  "log": [
    {
      "commit": "68e3e92620c323703bc7db75c2ba15239ee85c39",
      "tree": "0a825d6f78e43d9ecc86429a99dcb40ed6628c25",
      "parents": [
        "752dc185dacba1edcba425e67fc6df3c7793a5c3"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Jun 03 20:05:57 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Jun 03 20:05:57 2012 -0700"
      },
      "message": "Revert \"mm: compaction: handle incorrect MIGRATE_UNMOVABLE type pageblocks\"\n\nThis reverts commit 5ceb9ce6fe9462a298bb2cd5c9f1ca6cb80a0199.\n\nThat commit seems to be the cause of the mm compation list corruption\nissues that Dave Jones reported.  The locking (or rather, absense\nthere-of) is dubious, as is the use of the \u0027page\u0027 variable once it has\nbeen found to be outside the pageblock range.\n\nSo revert it for now, we can re-visit this for 3.6.  If we even need to:\nas Minchan Kim says, \"The patch wasn\u0027t a bug fix and even test workload\nwas very theoretical\".\n\nReported-and-tested-by: Dave Jones \u003cdavej@redhat.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: KOSAKI Motohiro \u003ckosaki.motohiro@gmail.com\u003e\nAcked-by: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nCc: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "fa9add641b1b1c564db916accac1db346e7a2759",
      "tree": "875e74ec4d7fed0018fdbc134ad899949c5e3384",
      "parents": [
        "75b00af77ed5b5a3d55549f9e0c33f3969b9330c"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Tue May 29 15:07:09 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:28 2012 -0700"
      },
      "message": "mm/memcg: apply add/del_page to lruvec\n\nTake lruvec further: pass it instead of zone to add_page_to_lru_list() and\ndel_page_from_lru_list(); and pagevec_lru_move_fn() pass lruvec down to\nits target functions.\n\nThis cleanup eliminates a swathe of cruft in memcontrol.c, including\nmem_cgroup_lru_add_list(), mem_cgroup_lru_del_list() and\nmem_cgroup_lru_move_lists() - which never actually touched the lists.\n\nIn their place, mem_cgroup_page_lruvec() to decide the lruvec, previously\na side-effect of add, and mem_cgroup_update_lru_size() to maintain the\nlru_size stats.\n\nWhilst these are simplifications in their own right, the goal is to bring\nthe evaluation of lruvec next to the spin_locking of the lrus, in\npreparation for a future patch.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nAcked-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f3fd4a61928a5edf5b033a417e761b488b43e203",
      "tree": "f56c5b6f4a4c732c9167e4cacb3e9c25ced0d000",
      "parents": [
        "014483bcccc5edbf861d89dc1a6f7cdc02f9f4c0"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Tue May 29 15:06:54 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:25 2012 -0700"
      },
      "message": "mm: remove lru type checks from __isolate_lru_page()\n\nAfter patch \"mm: forbid lumpy-reclaim in shrink_active_list()\" we can\ncompletely remove anon/file and active/inactive lru type filters from\n__isolate_lru_page(), because isolation for 0-order reclaim always\nisolates pages from right lru list.  And pages-isolation for lumpy\nshrink_inactive_list() or memory-compaction anyway allowed to isolate\npages from all evictable lru lists.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5ceb9ce6fe9462a298bb2cd5c9f1ca6cb80a0199",
      "tree": "52a6d3c27eceb8848a8e8d7e3de9e39ff8cc680c",
      "parents": [
        "238305bb4d418c95977162ba13c11880685fc731"
      ],
      "author": {
        "name": "Bartlomiej Zolnierkiewicz",
        "email": "b.zolnierkie@samsung.com",
        "time": "Tue May 29 15:06:37 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:22 2012 -0700"
      },
      "message": "mm: compaction: handle incorrect MIGRATE_UNMOVABLE type pageblocks\n\nWhen MIGRATE_UNMOVABLE pages are freed from MIGRATE_UNMOVABLE type\npageblock (and some MIGRATE_MOVABLE pages are left in it) waiting until an\nallocation takes ownership of the block may take too long.  The type of\nthe pageblock remains unchanged so the pageblock cannot be used as a\nmigration target during compaction.\n\nFix it by:\n\n* Adding enum compact_mode (COMPACT_ASYNC_[MOVABLE,UNMOVABLE], and\n  COMPACT_SYNC) and then converting sync field in struct compact_control\n  to use it.\n\n* Adding nr_pageblocks_skipped field to struct compact_control and\n  tracking how many destination pageblocks were of MIGRATE_UNMOVABLE type.\n   If COMPACT_ASYNC_MOVABLE mode compaction ran fully in\n  try_to_compact_pages() (COMPACT_COMPLETE) it implies that there is not a\n  suitable page for allocation.  In this case then check how if there were\n  enough MIGRATE_UNMOVABLE pageblocks to try a second pass in\n  COMPACT_ASYNC_UNMOVABLE mode.\n\n* Scanning the MIGRATE_UNMOVABLE pageblocks (during COMPACT_SYNC and\n  COMPACT_ASYNC_UNMOVABLE compaction modes) and building a count based on\n  finding PageBuddy pages, page_count(page) \u003d\u003d 0 or PageLRU pages.  If all\n  pages within the MIGRATE_UNMOVABLE pageblock are in one of those three\n  sets change the whole pageblock type to MIGRATE_MOVABLE.\n\nMy particular test case (on a ARM EXYNOS4 device with 512 MiB, which means\n131072 standard 4KiB pages in \u0027Normal\u0027 zone) is to:\n\n- allocate 120000 pages for kernel\u0027s usage\n- free every second page (60000 pages) of memory just allocated\n- allocate and use 60000 pages from user space\n- free remaining 60000 pages of kernel memory\n  (now we have fragmented memory occupied mostly by user space pages)\n- try to allocate 100 order-9 (2048 KiB) pages for kernel\u0027s usage\n\nThe results:\n- with compaction disabled I get 11 successful allocations\n- with compaction enabled - 14 successful allocations\n- with this patch I\u0027m able to get all 100 successful allocations\n\nNOTE: If we can make kswapd aware of order-0 request during compaction, we\ncan enhance kswapd with changing mode to COMPACT_ASYNC_FULL\n(COMPACT_ASYNC_MOVABLE + COMPACT_ASYNC_UNMOVABLE).  Please see the\nfollowing thread:\n\n\thttp://marc.info/?l\u003dlinux-mm\u0026m\u003d133552069417068\u0026w\u003d2\n\n[minchan@kernel.org: minor cleanups]\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nSigned-off-by: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "47118af076f64844b4f423bc2f545b2da9dab50d",
      "tree": "00df88cf2f60a2a3efc1a6c46ad88d128aee2071",
      "parents": [
        "6d4a49160de2c684fb59fa627bce80e200224331"
      ],
      "author": {
        "name": "Michal Nazarewicz",
        "email": "mina86@mina86.com",
        "time": "Thu Dec 29 13:09:50 2011 +0100"
      },
      "committer": {
        "name": "Marek Szyprowski",
        "email": "m.szyprowski@samsung.com",
        "time": "Mon May 21 15:09:32 2012 +0200"
      },
      "message": "mm: mmzone: MIGRATE_CMA migration type added\n\nThe MIGRATE_CMA migration type has two main characteristics:\n(i) only movable pages can be allocated from MIGRATE_CMA\npageblocks and (ii) page allocator will never change migration\ntype of MIGRATE_CMA pageblocks.\n\nThis guarantees (to some degree) that page in a MIGRATE_CMA page\nblock can always be migrated somewhere else (unless there\u0027s no\nmemory left in the system).\n\nIt is designed to be used for allocating big chunks (eg. 10MiB)\nof physically contiguous memory.  Once driver requests\ncontiguous memory, pages from MIGRATE_CMA pageblocks may be\nmigrated away to create a contiguous block.\n\nTo minimise number of migrations, MIGRATE_CMA migration type\nis the last type tried when page allocator falls back to other\nmigration types when requested.\n\nSigned-off-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nSigned-off-by: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nTested-by: Rob Clark \u003crob.clark@linaro.org\u003e\nTested-by: Ohad Ben-Cohen \u003cohad@wizery.com\u003e\nTested-by: Benjamin Gaignard \u003cbenjamin.gaignard@linaro.org\u003e\nTested-by: Robert Nelson \u003crobertcnelson@gmail.com\u003e\nTested-by: Barry Song \u003cBaohua.Song@csr.com\u003e\n"
    },
    {
      "commit": "ff9543fd32060917beb080b1eb2d1d41ec7f39e0",
      "tree": "31d2ff2026353945cc6f574148c54b4d53167a3b",
      "parents": [
        "85aa125f001f87f96a72e9e6ee515490843b1202"
      ],
      "author": {
        "name": "Michal Nazarewicz",
        "email": "mina86@mina86.com",
        "time": "Thu Dec 29 13:09:50 2011 +0100"
      },
      "committer": {
        "name": "Marek Szyprowski",
        "email": "m.szyprowski@samsung.com",
        "time": "Mon May 21 15:09:30 2012 +0200"
      },
      "message": "mm: compaction: export some of the functions\n\nThis commit exports some of the functions from compaction.c file\noutside of it adding their declaration into internal.h header\nfile so that other mm related code can use them.\n\nThis forced compaction.c to always be compiled (as opposed to being\ncompiled only if CONFIG_COMPACTION is defined) but as to avoid\nintroducing code that user did not ask for, part of the compaction.c\nis now wrapped in on #ifdef.\n\nSigned-off-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nSigned-off-by: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nTested-by: Rob Clark \u003crob.clark@linaro.org\u003e\nTested-by: Ohad Ben-Cohen \u003cohad@wizery.com\u003e\nTested-by: Benjamin Gaignard \u003cbenjamin.gaignard@linaro.org\u003e\nTested-by: Robert Nelson \u003crobertcnelson@gmail.com\u003e\nTested-by: Barry Song \u003cBaohua.Song@csr.com\u003e\n"
    },
    {
      "commit": "85aa125f001f87f96a72e9e6ee515490843b1202",
      "tree": "4191169ebd6fa2a4463f9dd04fd3cb4af41ca814",
      "parents": [
        "03d44192f69a45d780ba124f691e76020a44ebae"
      ],
      "author": {
        "name": "Michal Nazarewicz",
        "email": "mina86@mina86.com",
        "time": "Mon Jan 30 13:24:03 2012 +0100"
      },
      "committer": {
        "name": "Marek Szyprowski",
        "email": "m.szyprowski@samsung.com",
        "time": "Mon May 21 15:09:29 2012 +0200"
      },
      "message": "mm: compaction: introduce isolate_freepages_range()\n\nThis commit introduces isolate_freepages_range() function which\ngeneralises isolate_freepages_block() so that it can be used on\narbitrary PFN ranges.\n\nisolate_freepages_block() is left with only minor changes.\n\nSigned-off-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nSigned-off-by: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nTested-by: Rob Clark \u003crob.clark@linaro.org\u003e\nTested-by: Ohad Ben-Cohen \u003cohad@wizery.com\u003e\nTested-by: Benjamin Gaignard \u003cbenjamin.gaignard@linaro.org\u003e\nTested-by: Robert Nelson \u003crobertcnelson@gmail.com\u003e\nTested-by: Barry Song \u003cBaohua.Song@csr.com\u003e\n"
    },
    {
      "commit": "03d44192f69a45d780ba124f691e76020a44ebae",
      "tree": "81b43ba18b0fa70280a20fa534d37b9d0c5e5478",
      "parents": [
        "2fe86e0004076128f05d5a774b5c9c03d9dc3de2"
      ],
      "author": {
        "name": "Michal Nazarewicz",
        "email": "mina86@mina86.com",
        "time": "Mon Jan 30 13:23:47 2012 +0100"
      },
      "committer": {
        "name": "Marek Szyprowski",
        "email": "m.szyprowski@samsung.com",
        "time": "Mon May 21 15:09:28 2012 +0200"
      },
      "message": "mm: compaction: introduce map_pages()\n\nThis commit creates a map_pages() function which map pages freed\nusing split_free_pages().  This merely moves some code from\nisolate_freepages() so that it can be reused in other places.\n\nSigned-off-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nSigned-off-by: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nTested-by: Robert Nelson \u003crobertcnelson@gmail.com\u003e\nTested-by: Barry Song \u003cBaohua.Song@csr.com\u003e\n"
    },
    {
      "commit": "2fe86e0004076128f05d5a774b5c9c03d9dc3de2",
      "tree": "ba82764b62a587598081067de76fa5e989fe44a2",
      "parents": [
        "5f63b720b62925ef3c6a85473dcd547b0fd90616"
      ],
      "author": {
        "name": "Michal Nazarewicz",
        "email": "mina86@mina86.com",
        "time": "Mon Jan 30 13:16:26 2012 +0100"
      },
      "committer": {
        "name": "Marek Szyprowski",
        "email": "m.szyprowski@samsung.com",
        "time": "Mon May 21 15:09:27 2012 +0200"
      },
      "message": "mm: compaction: introduce isolate_migratepages_range()\n\nThis commit introduces isolate_migratepages_range() function which\nextracts functionality from isolate_migratepages() so that it can be\nused on arbitrary PFN ranges.\n\nisolate_migratepages() function is implemented as a simple wrapper\naround isolate_migratepages_range().\n\nSigned-off-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nSigned-off-by: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nTested-by: Rob Clark \u003crob.clark@linaro.org\u003e\nTested-by: Ohad Ben-Cohen \u003cohad@wizery.com\u003e\nTested-by: Benjamin Gaignard \u003cbenjamin.gaignard@linaro.org\u003e\nTested-by: Robert Nelson \u003crobertcnelson@gmail.com\u003e\nTested-by: Barry Song \u003cBaohua.Song@csr.com\u003e\n"
    },
    {
      "commit": "aad6ec3777bf4930d4f7293745cc4c17a2d87947",
      "tree": "9a2d141e3361e621d5d6f624d4f1b1e075dc9e7d",
      "parents": [
        "8575ec29f61da83a2bf382c8c490499dc022101e"
      ],
      "author": {
        "name": "Dan Carpenter",
        "email": "dan.carpenter@oracle.com",
        "time": "Wed Mar 21 16:33:54 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:56 2012 -0700"
      },
      "message": "mm: compaction: make compact_control order signed\n\n\"order\" is -1 when compacting via /proc/sys/vm/compact_memory.  Making\nit unsigned causes a bug in __compact_pgdat() when we test:\n\n\tif (cc-\u003eorder \u003c 0 || !compaction_deferred(zone, cc-\u003eorder))\n\t\tcompact_zone(zone, cc);\n\n[akpm@linux-foundation.org: make __compact_pgdat()\u0027s comparison match other code sites]\nSigned-off-by: Dan Carpenter \u003cdan.carpenter@oracle.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8575ec29f61da83a2bf382c8c490499dc022101e",
      "tree": "bba641ceec47b52ce2a91bdf117aed01d476ea9f",
      "parents": [
        "aff622495c9a0b56148192e53bdec539f5e147f2"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Wed Mar 21 16:33:53 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:56 2012 -0700"
      },
      "message": "compact_pgdat: workaround lockdep warning in kswapd\n\nI get this lockdep warning from swapping load on linux-next, due to\n\"vmscan: kswapd carefully call compaction\".\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n[ INFO: inconsistent lock state ]\n3.3.0-rc2-next-20120201 #5 Not tainted\n---------------------------------\ninconsistent {RECLAIM_FS-ON-W} -\u003e {IN-RECLAIM_FS-W} usage.\nkswapd0/28 [HC0[0]:SC0[0]:HE1:SE1] takes:\n (pcpu_alloc_mutex){+.+.?.}, at: [\u003cffffffff810d6684\u003e] pcpu_alloc+0x67/0x325\n{RECLAIM_FS-ON-W} state was registered at:\n  [\u003cffffffff81099b75\u003e] mark_held_locks+0xd7/0x103\n  [\u003cffffffff8109a13c\u003e] lockdep_trace_alloc+0x85/0x9e\n  [\u003cffffffff810f6bdc\u003e] __kmalloc+0x6c/0x14b\n  [\u003cffffffff810d57fd\u003e] pcpu_mem_zalloc+0x59/0x62\n  [\u003cffffffff810d5d16\u003e] pcpu_extend_area_map+0x26/0xb1\n  [\u003cffffffff810d679f\u003e] pcpu_alloc+0x182/0x325\n  [\u003cffffffff810d694d\u003e] __alloc_percpu+0xb/0xd\n  [\u003cffffffff8142ebfd\u003e] snmp_mib_init+0x1e/0x2e\n  [\u003cffffffff8185cd8d\u003e] ipv4_mib_init_net+0x7a/0x184\n  [\u003cffffffff813dc963\u003e] ops_init.clone.0+0x6b/0x73\n  [\u003cffffffff813dc9cc\u003e] register_pernet_operations+0x61/0xa0\n  [\u003cffffffff813dca8e\u003e] register_pernet_subsys+0x29/0x42\n  [\u003cffffffff8185d044\u003e] inet_init+0x1ad/0x252\n  [\u003cffffffff810002e3\u003e] do_one_initcall+0x7a/0x12f\n  [\u003cffffffff81832bc5\u003e] kernel_init+0x9d/0x11e\n  [\u003cffffffff814e51e4\u003e] kernel_thread_helper+0x4/0x10\nirq event stamp: 656613\nhardirqs last  enabled at (656613): [\u003cffffffff814e0ddc\u003e] __mutex_unlock_slowpath+0x104/0x128\nhardirqs last disabled at (656612): [\u003cffffffff814e0d34\u003e] __mutex_unlock_slowpath+0x5c/0x128\nsoftirqs last  enabled at (655568): [\u003cffffffff8105b4a5\u003e] __do_softirq+0x120/0x136\nsoftirqs last disabled at (654757): [\u003cffffffff814e52dc\u003e] call_softirq+0x1c/0x30\n\nother info that might help us debug this:\n Possible unsafe locking scenario:\n\n       CPU0\n       ----\n  lock(pcpu_alloc_mutex);\n  \u003cInterrupt\u003e\n    lock(pcpu_alloc_mutex);\n\n *** DEADLOCK ***\n\nno locks held by kswapd0/28.\n\nstack backtrace:\nPid: 28, comm: kswapd0 Not tainted 3.3.0-rc2-next-20120201 #5\nCall Trace:\n [\u003cffffffff810981f4\u003e] print_usage_bug+0x1bf/0x1d0\n [\u003cffffffff81096c3e\u003e] ? print_irq_inversion_bug+0x1d9/0x1d9\n [\u003cffffffff810982c0\u003e] mark_lock_irq+0xbb/0x22e\n [\u003cffffffff810c5399\u003e] ? free_hot_cold_page+0x13d/0x14f\n [\u003cffffffff81098684\u003e] mark_lock+0x251/0x331\n [\u003cffffffff81098893\u003e] mark_irqflags+0x12f/0x141\n [\u003cffffffff81098e32\u003e] __lock_acquire+0x58d/0x753\n [\u003cffffffff810d6684\u003e] ? pcpu_alloc+0x67/0x325\n [\u003cffffffff81099433\u003e] lock_acquire+0x54/0x6a\n [\u003cffffffff810d6684\u003e] ? pcpu_alloc+0x67/0x325\n [\u003cffffffff8107a5b8\u003e] ? add_preempt_count+0xa9/0xae\n [\u003cffffffff814e0a21\u003e] mutex_lock_nested+0x5e/0x315\n [\u003cffffffff810d6684\u003e] ? pcpu_alloc+0x67/0x325\n [\u003cffffffff81098f81\u003e] ? __lock_acquire+0x6dc/0x753\n [\u003cffffffff810c9fb0\u003e] ? __pagevec_release+0x2c/0x2c\n [\u003cffffffff810d6684\u003e] pcpu_alloc+0x67/0x325\n [\u003cffffffff810c9fb0\u003e] ? __pagevec_release+0x2c/0x2c\n [\u003cffffffff810d694d\u003e] __alloc_percpu+0xb/0xd\n [\u003cffffffff8106c35e\u003e] schedule_on_each_cpu+0x23/0x110\n [\u003cffffffff810c9fcb\u003e] lru_add_drain_all+0x10/0x12\n [\u003cffffffff810f126f\u003e] __compact_pgdat+0x20/0x182\n [\u003cffffffff810f15c2\u003e] compact_pgdat+0x27/0x29\n [\u003cffffffff810c306b\u003e] ? zone_watermark_ok+0x1a/0x1c\n [\u003cffffffff810cdf6f\u003e] balance_pgdat+0x732/0x751\n [\u003cffffffff810ce0ed\u003e] kswapd+0x15f/0x178\n [\u003cffffffff810cdf8e\u003e] ? balance_pgdat+0x751/0x751\n [\u003cffffffff8106fd11\u003e] kthread+0x84/0x8c\n [\u003cffffffff814e51e4\u003e] kernel_thread_helper+0x4/0x10\n [\u003cffffffff810787ed\u003e] ? finish_task_switch+0x85/0xea\n [\u003cffffffff814e3861\u003e] ? retint_restore_args+0xe/0xe\n [\u003cffffffff8106fc8d\u003e] ? __init_kthread_worker+0x56/0x56\n [\u003cffffffff814e51e0\u003e] ? gs_change+0xb/0xb\n\nThe RECLAIM_FS notations indicate that it\u0027s doing the GFP_FS checking that\nNick hacked into lockdep a while back: I think we\u0027re intended to read that\n\"\u003cInterrupt\u003e\" in the DEADLOCK scenario as \"\u003cDirect reclaim\u003e\".\n\nI\u0027m hazy, I have not reached any conclusion as to whether it\u0027s right to\ncomplain or not; but I believe it\u0027s uneasy about kswapd now doing the\nmutex_lock(\u0026pcpu_alloc_mutex) which lru_add_drain_all() entails.  Nor have\nI reached any conclusion as to whether it\u0027s important for kswapd to do\nthat draining or not.\n\nBut so as not to get blocked on this, with lockdep disabled from giving\nfurther reports, here\u0027s a patch which removes the lru_add_drain_all() from\nkswapd\u0027s callpath (and calls it only once from compact_nodes(), instead of\nonce per node).\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "aff622495c9a0b56148192e53bdec539f5e147f2",
      "tree": "78f6400d8b6bec3279483006a0e9543e47aa833e",
      "parents": [
        "7be62de99adcab4449d416977b4274985c5fe023"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Wed Mar 21 16:33:52 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:56 2012 -0700"
      },
      "message": "vmscan: only defer compaction for failed order and higher\n\nCurrently a failed order-9 (transparent hugepage) compaction can lead to\nmemory compaction being temporarily disabled for a memory zone.  Even if\nwe only need compaction for an order 2 allocation, eg.  for jumbo frames\nnetworking.\n\nThe fix is relatively straightforward: keep track of the highest order at\nwhich compaction is succeeding, and only defer compaction for orders at\nwhich compaction is failing.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7be62de99adcab4449d416977b4274985c5fe023",
      "tree": "20ae021ec9811ad730e6a17a3530d3aa6b5027d0",
      "parents": [
        "fe2c2a106663130a5ab45cb0e3414b52df2fff0c"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Wed Mar 21 16:33:52 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:56 2012 -0700"
      },
      "message": "vmscan: kswapd carefully call compaction\n\nWith CONFIG_COMPACTION enabled, kswapd does not try to free contiguous\nfree pages, even when it is woken for a higher order request.\n\nThis could be bad for eg.  jumbo frame network allocations, which are done\nfrom interrupt context and cannot compact memory themselves.  Higher than\nbefore allocation failure rates in the network receive path have been\nobserved in kernels with compaction enabled.\n\nTeach kswapd to defragment the memory zones in a node, but only if\nrequired and compaction is not deferred in a zone.\n\n[akpm@linux-foundation.org: reduce scope of zones_need_compaction]\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dc9086004b3d5db75997a645b3fe08d9138b7ad0",
      "tree": "1859fa0c376694998438f784279bfddb0f9663ed",
      "parents": [
        "1ecd3c7ea76488c63b4b0a2561fd7eaf96cc8028"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Wed Feb 08 17:13:38 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Feb 08 19:03:51 2012 -0800"
      },
      "message": "mm: compaction: check for overlapping nodes during isolation for migration\n\nWhen isolating pages for migration, migration starts at the start of a\nzone while the free scanner starts at the end of the zone.  Migration\navoids entering a new zone by never going beyond the free scanned.\n\nUnfortunately, in very rare cases nodes can overlap.  When this happens,\nmigration isolates pages without the LRU lock held, corrupting lists\nwhich will trigger errors in reclaim or during page free such as in the\nfollowing oops\n\n  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008\n  IP: [\u003cffffffff810f795c\u003e] free_pcppages_bulk+0xcc/0x450\n  PGD 1dda554067 PUD 1e1cb58067 PMD 0\n  Oops: 0000 [#1] SMP\n  CPU 37\n  Pid: 17088, comm: memcg_process_s Tainted: G            X\n  RIP: free_pcppages_bulk+0xcc/0x450\n  Process memcg_process_s (pid: 17088, threadinfo ffff881c2926e000, task ffff881c2926c0c0)\n  Call Trace:\n    free_hot_cold_page+0x17e/0x1f0\n    __pagevec_free+0x90/0xb0\n    release_pages+0x22a/0x260\n    pagevec_lru_move_fn+0xf3/0x110\n    putback_lru_page+0x66/0xe0\n    unmap_and_move+0x156/0x180\n    migrate_pages+0x9e/0x1b0\n    compact_zone+0x1f3/0x2f0\n    compact_zone_order+0xa2/0xe0\n    try_to_compact_pages+0xdf/0x110\n    __alloc_pages_direct_compact+0xee/0x1c0\n    __alloc_pages_slowpath+0x370/0x830\n    __alloc_pages_nodemask+0x1b1/0x1c0\n    alloc_pages_vma+0x9b/0x160\n    do_huge_pmd_anonymous_page+0x160/0x270\n    do_page_fault+0x207/0x4c0\n    page_fault+0x25/0x30\n\nThe \"X\" in the taint flag means that external modules were loaded but but\nis unrelated to the bug triggering.  The real problem was because the PFN\nlayout looks like this\n\n  Zone PFN ranges:\n    DMA      0x00000010 -\u003e 0x00001000\n    DMA32    0x00001000 -\u003e 0x00100000\n    Normal   0x00100000 -\u003e 0x01e80000\n  Movable zone start PFN for each node\n  early_node_map[14] active PFN ranges\n      0: 0x00000010 -\u003e 0x0000009b\n      0: 0x00000100 -\u003e 0x0007a1ec\n      0: 0x0007a354 -\u003e 0x0007a379\n      0: 0x0007f7ff -\u003e 0x0007f800\n      0: 0x00100000 -\u003e 0x00680000\n      1: 0x00680000 -\u003e 0x00e80000\n      0: 0x00e80000 -\u003e 0x01080000\n      1: 0x01080000 -\u003e 0x01280000\n      0: 0x01280000 -\u003e 0x01480000\n      1: 0x01480000 -\u003e 0x01680000\n      0: 0x01680000 -\u003e 0x01880000\n      1: 0x01880000 -\u003e 0x01a80000\n      0: 0x01a80000 -\u003e 0x01c80000\n      1: 0x01c80000 -\u003e 0x01e80000\n\nThe fix is straight-forward.  isolate_migratepages() has to make a\nsimilar check to isolate_freepage to ensure that it never isolates pages\nfrom a zone it does not hold the LRU lock for.\n\nThis was discovered in a 3.0-based kernel but it affects 3.1.x, 3.2.x\nand current mainline.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0bf380bc70ecba68cb4d74dc656cc2fa8c4d801a",
      "tree": "6d5869a979b62c3b21491f007519185af30442a0",
      "parents": [
        "3deaa7190a8da38453c4fabd9dec7f66d17fff67"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Fri Feb 03 15:37:18 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Feb 03 16:16:41 2012 -0800"
      },
      "message": "mm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration\n\nWhen isolating for migration, migration starts at the start of a zone\nwhich is not necessarily pageblock aligned.  Further, it stops isolating\nwhen COMPACT_CLUSTER_MAX pages are isolated so migrate_pfn is generally\nnot aligned.  This allows isolate_migratepages() to call pfn_to_page() on\nan invalid PFN which can result in a crash.  This was originally reported\nagainst a 3.0-based kernel with the following trace in a crash dump.\n\nPID: 9902   TASK: d47aecd0  CPU: 0   COMMAND: \"memcg_process_s\"\n #0 [d72d3ad0] crash_kexec at c028cfdb\n #1 [d72d3b24] oops_end at c05c5322\n #2 [d72d3b38] __bad_area_nosemaphore at c0227e60\n #3 [d72d3bec] bad_area at c0227fb6\n #4 [d72d3c00] do_page_fault at c05c72ec\n #5 [d72d3c80] error_code (via page_fault) at c05c47a4\n    EAX: 00000000  EBX: 000c0000  ECX: 00000001  EDX: 00000807  EBP: 000c0000\n    DS:  007b      ESI: 00000001  ES:  007b      EDI: f3000a80  GS:  6f50\n    CS:  0060      EIP: c030b15a  ERR: ffffffff  EFLAGS: 00010002\n #6 [d72d3cb4] isolate_migratepages at c030b15a\n #7 [d72d3d14] zone_watermark_ok at c02d26cb\n #8 [d72d3d2c] compact_zone at c030b8de\n #9 [d72d3d68] compact_zone_order at c030bba1\n#10 [d72d3db4] try_to_compact_pages at c030bc84\n#11 [d72d3ddc] __alloc_pages_direct_compact at c02d61e7\n#12 [d72d3e08] __alloc_pages_slowpath at c02d66c7\n#13 [d72d3e78] __alloc_pages_nodemask at c02d6a97\n#14 [d72d3eb8] alloc_pages_vma at c030a845\n#15 [d72d3ed4] do_huge_pmd_anonymous_page at c03178eb\n#16 [d72d3f00] handle_mm_fault at c02f36c6\n#17 [d72d3f30] do_page_fault at c05c70ed\n#18 [d72d3fb0] error_code (via page_fault) at c05c47a4\n    EAX: b71ff000  EBX: 00000001  ECX: 00001600  EDX: 00000431\n    DS:  007b      ESI: 08048950  ES:  007b      EDI: bfaa3788\n    SS:  007b      ESP: bfaa36e0  EBP: bfaa3828  GS:  6f50\n    CS:  0073      EIP: 080487c8  ERR: ffffffff  EFLAGS: 00010202\n\nIt was also reported by Herbert van den Bergh against 3.1-based kernel\nwith the following snippet from the console log.\n\nBUG: unable to handle kernel paging request at 01c00008\nIP: [\u003cc0522399\u003e] isolate_migratepages+0x119/0x390\n*pdpt \u003d 000000002f7ce001 *pde \u003d 0000000000000000\n\nIt is expected that it also affects 3.2.x and current mainline.\n\nThe problem is that pfn_valid is only called on the first PFN being\nchecked and that PFN is not necessarily aligned.  Lets say we have a case\nlike this\n\nH \u003d MAX_ORDER_NR_PAGES boundary\n| \u003d pageblock boundary\nm \u003d cc-\u003emigrate_pfn\nf \u003d cc-\u003efree_pfn\no \u003d memory hole\n\nH------|------H------|----m-Hoooooo|ooooooH-f----|------H\n\nThe migrate_pfn is just below a memory hole and the free scanner is beyond\nthe hole.  When isolate_migratepages started, it scans from migrate_pfn to\nmigrate_pfn+pageblock_nr_pages which is now in a memory hole.  It checks\npfn_valid() on the first PFN but then scans into the hole where there are\nnot necessarily valid struct pages.\n\nThis patch ensures that isolate_migratepages calls pfn_valid when\nnecessary.\n\nReported-by: Herbert van den Bergh \u003cherbert.van.den.bergh@oracle.com\u003e\nTested-by: Herbert van den Bergh \u003cherbert.van.den.bergh@oracle.com\u003e\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a6bc32b899223a877f595ef9ddc1e89ead5072b8",
      "tree": "a9529f7af2cf8e77bb6670acea32169c891a2b76",
      "parents": [
        "66199712e9eef5aede09dbcd9dfff87798a66917"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Thu Jan 12 17:19:43 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:09 2012 -0800"
      },
      "message": "mm: compaction: introduce sync-light migration for use by compaction\n\nThis patch adds a lightweight sync migrate operation MIGRATE_SYNC_LIGHT\nmode that avoids writing back pages to backing storage.  Async compaction\nmaps to MIGRATE_ASYNC while sync compaction maps to MIGRATE_SYNC_LIGHT.\nFor other migrate_pages users such as memory hotplug, MIGRATE_SYNC is\nused.\n\nThis avoids sync compaction stalling for an excessive length of time,\nparticularly when copying files to a USB stick where there might be a\nlarge number of dirty pages backed by a filesystem that does not support\n-\u003ewritepages.\n\n[aarcange@redhat.com: This patch is heavily based on Andrea\u0027s work]\n[akpm@linux-foundation.org: fix fs/nfs/write.c build]\n[akpm@linux-foundation.org: fix fs/btrfs/disk-io.c build]\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nCc: Jan Kara \u003cjack@suse.cz\u003e\nCc: Andy Isaacson \u003cadi@hexapodia.org\u003e\nCc: Nai Xia \u003cnai.xia@gmail.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c82449352854ff09e43062246af86bdeb628f0c3",
      "tree": "9cb8052e425c8cdab24ac41e83bbb672832ce54e",
      "parents": [
        "b969c4ab9f182a6e1b2a0848be349f99714947b0"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Thu Jan 12 17:19:38 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:09 2012 -0800"
      },
      "message": "mm: compaction: make isolate_lru_page() filter-aware again\n\nCommit 39deaf85 (\"mm: compaction: make isolate_lru_page() filter-aware\")\nnoted that compaction does not migrate dirty or writeback pages and that\nis was meaningless to pick the page and re-add it to the LRU list.  This\nhad to be partially reverted because some dirty pages can be migrated by\ncompaction without blocking.\n\nThis patch updates \"mm: compaction: make isolate_lru_page\" by skipping\nover pages that migration has no possibility of migrating to minimise LRU\ndisruption.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Rik van Riel\u003criel@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nCc: Jan Kara \u003cjack@suse.cz\u003e\nCc: Andy Isaacson \u003cadi@hexapodia.org\u003e\nCc: Nai Xia \u003cnai.xia@gmail.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b16d3d5a5219d01e9be5e586e5d50fbf1ca955ea",
      "tree": "790422876526d780e1b66dd47ae522bfa3b73484",
      "parents": [
        "a77ebd333cd810d7b680d544be88c875131c2bd3"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Thu Jan 12 17:19:26 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:08 2012 -0800"
      },
      "message": "mm: compaction: use synchronous compaction for /proc/sys/vm/compact_memory\n\nWhen asynchronous compaction was introduced, the\n/proc/sys/vm/compact_memory handler should have been updated to always use\nsynchronous compaction.  This did not happen so this patch addresses it.\n\nThe assumption is if a user writes to /proc/sys/vm/compact_memory, they\nare willing for that process to stall.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nCc: Jan Kara \u003cjack@suse.cz\u003e\nCc: Andy Isaacson \u003cadi@hexapodia.org\u003e\nCc: Nai Xia \u003cnai.xia@gmail.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a77ebd333cd810d7b680d544be88c875131c2bd3",
      "tree": "f7e3baabdb4d81e089924e402442b21c4eaa3aab",
      "parents": [
        "ea4d349ffa8028c655236497c2ba17c17aaa0d65"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Thu Jan 12 17:19:22 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:08 2012 -0800"
      },
      "message": "mm: compaction: allow compaction to isolate dirty pages\n\nShort summary: There are severe stalls when a USB stick using VFAT is\nused with THP enabled that are reduced by this series.  If you are\nexperiencing this problem, please test and report back and considering I\nhave seen complaints from openSUSE and Fedora users on this as well as a\nfew private mails, I\u0027m guessing it\u0027s a widespread issue.  This is a new\ntype of USB-related stall because it is due to synchronous compaction\nwriting where as in the past the big problem was dirty pages reaching\nthe end of the LRU and being written by reclaim.\n\nAm cc\u0027ing Andrew this time and this series would replace\nmm-do-not-stall-in-synchronous-compaction-for-thp-allocations.patch.\nI\u0027m also cc\u0027ing Dave Jones as he might have merged that patch to Fedora\nfor wider testing and ideally it would be reverted and replaced by this\nseries.\n\nThat said, the later patches could really do with some review.  If this\nseries is not the answer then a new direction needs to be discussed\nbecause as it is, the stalls are unacceptable as the results in this\nleader show.\n\nFor testers that try backporting this to 3.1, it won\u0027t work because\nthere is a non-obvious dependency on not writing back pages in direct\nreclaim so you need those patches too.\n\nChangelog since V5\no Rebase to 3.2-rc5\no Tidy up the changelogs a bit\n\nChangelog since V4\no Added reviewed-bys, credited Andrea properly for sync-light\no Allow dirty pages without mappings to be considered for migration\no Bound the number of pages freed for compaction\no Isolate PageReclaim pages on their own LRU list\n\nThis is against 3.2-rc5 and follows on from discussions on \"mm: Do\nnot stall in synchronous compaction for THP allocations\" and \"[RFC\nPATCH 0/5] Reduce compaction-related stalls\". Initially, the proposed\npatch eliminated stalls due to compaction which sometimes resulted in\nuser-visible interactivity problems on browsers by simply never using\nsync compaction. The downside was that THP success allocation rates\nwere lower because dirty pages were not being migrated as reported by\nAndrea. His approach at fixing this was nacked on the grounds that\nit reverted fixes from Rik merged that reduced the amount of pages\nreclaimed as it severely impacted his workloads performance.\n\nThis series attempts to reconcile the requirements of maximising THP\nusage, without stalling in a user-visible fashion due to compaction\nor cheating by reclaiming an excessive number of pages.\n\nPatch 1 partially reverts commit 39deaf85 to allow migration to isolate\n\tdirty pages. This is because migration can move some dirty\n\tpages without blocking.\n\nPatch 2 notes that the /proc/sys/vm/compact_memory handler is not using\n\tsynchronous compaction when it should be. This is unrelated\n\tto the reported stalls but is worth fixing.\n\nPatch 3 checks if we isolated a compound page during lumpy scan and\n\taccount for it properly. For the most part, this affects\n\ttracing so it\u0027s unrelated to the stalls but worth fixing.\n\nPatch 4 notes that it is possible to abort reclaim early for compaction\n\tand return 0 to the page allocator potentially entering the\n\t\"may oom\" path. This has not been observed in practice but\n\tthe rest of the series potentially makes it easier to happen.\n\nPatch 5 adds a sync parameter to the migratepage callback and gives\n\tthe callback responsibility for migrating the page without\n\tblocking if sync\u003d\u003dfalse. For example, fallback_migrate_page\n\twill not call writepage if sync\u003d\u003dfalse. This increases the\n\tnumber of pages that can be handled by asynchronous compaction\n\tthereby reducing stalls.\n\nPatch 6 restores filter-awareness to isolate_lru_page for migration.\n\tIn practice, it means that pages under writeback and pages\n\twithout a -\u003emigratepage callback will not be isolated\n\tfor migration.\n\nPatch 7 avoids calling direct reclaim if compaction is deferred but\n\tmakes sure that compaction is only deferred if sync\n\tcompaction was used.\n\nPatch 8 introduces a sync-light migration mechanism that sync compaction\n\tuses. The objective is to allow some stalls but to not call\n\t-\u003ewritepage which can lead to significant user-visible stalls.\n\nPatch 9 notes that while we want to abort reclaim ASAP to allow\n\tcompation to go ahead that we leave a very small window of\n\topportunity for compaction to run. This patch allows more pages\n\tto be freed by reclaim but bounds the number to a reasonable\n\tlevel based on the high watermark on each zone.\n\nPatch 10 allows slabs to be shrunk even after compaction_ready() is\n\ttrue for one zone. This is to avoid a problem whereby a single\n\tsmall zone can abort reclaim even though no pages have been\n\treclaimed and no suitably large zone is in a usable state.\n\nPatch 11 fixes a problem with the rate of page scanning. As reclaim is\n\trarely stalling on pages under writeback it means that scan\n\trates are very high. This is particularly true for direct\n\treclaim which is not calling writepage. The vmstat figures\n\timplied that much of this was busy work with PageReclaim pages\n\tmarked for immediate reclaim. This patch is a prototype that\n\tmoves these pages to their own LRU list.\n\nThis has been tested and other than 2 USB keys getting trashed,\nnothing horrible fell out. That said, I am a bit unhappy with the\nrescue logic in patch 11 but did not find a better way around it. It\ndoes significantly reduce scan rates and System CPU time indicating\nit is the right direction to take.\n\nWhat is of critical importance is that stalls due to compaction\nare massively reduced even though sync compaction was still\nallowed. Testing from people complaining about stalls copying to USBs\nwith THP enabled are particularly welcome.\n\nThe following tests all involve THP usage and USB keys in some\nway. Each test follows this type of pattern\n\n1. Read from some fast fast storage, be it raw device or file. Each time\n   the copy finishes, start again until the test ends\n2. Write a large file to a filesystem on a USB stick. Each time the copy\n   finishes, start again until the test ends\n3. When memory is low, start an alloc process that creates a mapping\n   the size of physical memory to stress THP allocation. This is the\n   \"real\" part of the test and the part that is meant to trigger\n   stalls when THP is enabled. Copying continues in the background.\n4. Record the CPU usage and time to execute of the alloc process\n5. Record the number of THP allocs and fallbacks as well as the number of THP\n   pages in use a the end of the test just before alloc exited\n6. Run the test 5 times to get an idea of variability\n7. Between each run, sync is run and caches dropped and the test\n   waits until nr_dirty is a small number to avoid interference\n   or caching between iterations that would skew the figures.\n\nThe individual tests were then\n\nwritebackCPDeviceBasevfat\n\tDisable THP, read from a raw device (sda), vfat on USB stick\nwritebackCPDeviceBaseext4\n\tDisable THP, read from a raw device (sda), ext4 on USB stick\nwritebackCPDevicevfat\n\tTHP enabled, read from a raw device (sda), vfat on USB stick\nwritebackCPDeviceext4\n\tTHP enabled, read from a raw device (sda), ext4 on USB stick\nwritebackCPFilevfat\n\tTHP enabled, read from a file on fast storage and USB, both vfat\nwritebackCPFileext4\n\tTHP enabled, read from a file on fast storage and USB, both ext4\n\nThe kernels tested were\n\n3.1\t\t3.1\nvanilla\t\t3.2-rc5\nfreemore\tPatches 1-10\nimmediate\tPatches 1-11\nandrea\t\tThe 8 patches Andrea posted as a basis of comparison\n\nThe results are very long unfortunately. I\u0027ll start with the case\nwhere we are not using THP at all\n\nwritebackCPDeviceBasevfat\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.28 (    0.00%)   54.49 (-4143.46%)   48.63 (-3687.69%)    4.69 ( -265.11%)   51.88 (-3940.81%)\n+/-                 0.06 (    0.00%)    2.45 (-4305.55%)    4.75 (-8430.57%)    7.46 (-13282.76%)    4.76 (-8440.70%)\nUser Time           0.09 (    0.00%)    0.05 (   40.91%)    0.06 (   29.55%)    0.07 (   15.91%)    0.06 (   27.27%)\n+/-                 0.02 (    0.00%)    0.01 (   45.39%)    0.02 (   25.07%)    0.00 (   77.06%)    0.01 (   52.24%)\nElapsed Time      110.27 (    0.00%)   56.38 (   48.87%)   49.95 (   54.70%)   11.77 (   89.33%)   53.43 (   51.54%)\n+/-                 7.33 (    0.00%)    3.77 (   48.61%)    4.94 (   32.63%)    6.71 (    8.50%)    4.76 (   35.03%)\nTHP Active          0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n+/-                 0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\nFault Alloc         0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n+/-                 0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\nFault Fallback      0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n+/-                 0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n\nThe THP figures are obviously all 0 because THP was enabled. The\nmain thing to watch is the elapsed times and how they compare to\ntimes when THP is enabled later. It\u0027s also important to note that\nelapsed time is improved by this series as System CPu time is much\nreduced.\n\nwritebackCPDevicevfat\n\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.22 (    0.00%)   13.89 (-1040.72%)   46.40 (-3709.20%)    4.44 ( -264.37%)   47.37 (-3789.33%)\n+/-                 0.06 (    0.00%)   22.82 (-37635.56%)    3.84 (-6249.44%)    6.48 (-10618.92%)    6.60\n(-10818.53%)\nUser Time           0.06 (    0.00%)    0.06 (   -6.90%)    0.05 (   17.24%)    0.05 (   13.79%)    0.04 (   31.03%)\n+/-                 0.01 (    0.00%)    0.01 (   33.33%)    0.01 (   33.33%)    0.01 (   39.14%)    0.01 (   25.46%)\nElapsed Time     10445.54 (    0.00%) 2249.92 (   78.46%)   70.06 (   99.33%)   16.59 (   99.84%)  472.43 (\n95.48%)\n+/-               643.98 (    0.00%)  811.62 (  -26.03%)   10.02 (   98.44%)    7.03 (   98.91%)   59.99 (   90.68%)\nTHP Active         15.60 (    0.00%)   35.20 (  225.64%)   65.00 (  416.67%)   70.80 (  453.85%)   62.20 (  398.72%)\n+/-                18.48 (    0.00%)   51.29 (  277.59%)   15.99 (   86.52%)   37.91 (  205.18%)   22.02 (  119.18%)\nFault Alloc       121.80 (    0.00%)   76.60 (   62.89%)  155.40 (  127.59%)  181.20 (  148.77%)  286.60 (  235.30%)\n+/-                73.51 (    0.00%)   61.11 (   83.12%)   34.89 (   47.46%)   31.88 (   43.36%)   68.13 (   92.68%)\nFault Fallback    881.20 (    0.00%)  926.60 (   -5.15%)  847.60 (    3.81%)  822.00 (    6.72%)  716.60 (   18.68%)\n+/-                73.51 (    0.00%)   61.26 (   16.67%)   34.89 (   52.54%)   31.65 (   56.94%)   67.75 (    7.84%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)       3540.88   1945.37    716.04     64.97   1937.03\nTotal Elapsed Time (seconds)              52417.33  11425.90    501.02    230.95   2520.28\n\nThe first thing to note is the \"Elapsed Time\" for the vanilla kernels\nof 2249 seconds versus 56 with THP disabled which might explain the\nreports of USB stalls with THP enabled. Applying the patches brings\nperformance in line with THP-disabled performance while isolating\npages for immediate reclaim from the LRU cuts down System CPU time.\n\nThe \"Fault Alloc\" success rate figures are also improved. The vanilla\nkernel only managed to allocate 76.6 pages on average over the course\nof 5 iterations where as applying the series allocated 181.20 on\naverage albeit it is well within variance. It\u0027s worth noting that\napplies the series at least descreases the amount of variance which\nimplies an improvement.\n\nAndrea\u0027s series had a higher success rate for THP allocations but\nat a severe cost to elapsed time which is still better than vanilla\nbut still much worse than disabling THP altogether. One can bring my\nseries close to Andrea\u0027s by removing this check\n\n        /*\n         * If compaction is deferred for high-order allocations, it is because\n         * sync compaction recently failed. In this is the case and the caller\n         * has requested the system not be heavily disrupted, fail the\n         * allocation now instead of entering direct reclaim\n         */\n        if (deferred_compaction \u0026\u0026 (gfp_mask \u0026 __GFP_NO_KSWAPD))\n                goto nopage;\n\nI didn\u0027t include a patch that removed the above check because hurting\noverall performance to improve the THP figure is not what the average\nuser wants. It\u0027s something to consider though if someone really wants\nto maximise THP usage no matter what it does to the workload initially.\n\nThis is summary of vmstat figures from the same test.\n\n                                       3.1.0-vanilla rc5-vanilla freemore-v6r1 isolate-v6r1 andrea-v2r1\nPage Ins                                  3257266139  1111844061    17263623    10901575   161423219\nPage Outs                                   81054922    30364312     3626530     3657687     8753730\nSwap Ins                                        3294        2851        6560        4964        4592\nSwap Outs                                     390073      528094      620197      790912      698285\nDirect pages scanned                      1077581700  3024951463  1764930052   115140570  5901188831\nKswapd pages scanned                        34826043     7112868     2131265     1686942     1893966\nKswapd pages reclaimed                      28950067     4911036     1246044      966475     1497726\nDirect pages reclaimed                     805148398   280167837     3623473     2215044    40809360\nKswapd efficiency                                83%         69%         58%         57%         79%\nKswapd velocity                              664.399     622.521    4253.852    7304.360     751.490\nDirect efficiency                                74%          9%          0%          1%          0%\nDirect velocity                            20557.737  264745.137 3522673.849  498551.938 2341481.435\nPercentage direct scans                          96%         99%         99%         98%         99%\nPage writes by reclaim                        722646      529174      620319      791018      699198\nPage writes file                              332573        1080         122         106         913\nPage writes anon                              390073      528094      620197      790912      698285\nPage reclaim immediate                             0  2552514720  1635858848   111281140  5478375032\nPage rescued immediate                             0           0           0       87848           0\nSlabs scanned                                  23552       23552        9216        8192        9216\nDirect inode steals                              231           0           0           0           0\nKswapd inode steals                                0           0           0           0           0\nKswapd skipped wait                            28076         786           0          61           6\nTHP fault alloc                                  609         383         753         906        1433\nTHP collapse alloc                                12           6           0           0           6\nTHP splits                                       536         211         456         593        1136\nTHP fault fallback                              4406        4633        4263        4110        3583\nTHP collapse fail                                120         127           0           0           4\nCompaction stalls                               1810         728         623         779        3200\nCompaction success                               196          53          60          80         123\nCompaction failures                             1614         675         563         699        3077\nCompaction pages moved                        193158       53545      243185      333457      226688\nCompaction move failure                         9952        9396       16424       23676       45070\n\nThe main things to look at are\n\n1. Page In/out figures are much reduced by the series.\n\n2. Direct page scanning is incredibly high (264745.137 pages scanned\n   per second on the vanilla kernel) but isolating PageReclaim pages\n   on their own list reduces the number of pages scanned significantly.\n\n3. The fact that \"Page rescued immediate\" is a positive number implies\n   that we sometimes race removing pages from the LRU_IMMEDIATE list\n   that need to be put back on a normal LRU but it happens only for\n   0.07% of the pages marked for immediate reclaim.\n\nwritebackCPDeviceext4\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.51 (    0.00%)    1.77 (  -17.66%)    1.46 (    2.92%)    1.15 (   23.77%)    1.89 (  -25.63%)\n+/-                 0.27 (    0.00%)    0.67 ( -148.52%)    0.33 (  -22.76%)    0.30 (  -11.15%)    0.19 (   30.16%)\nUser Time           0.03 (    0.00%)    0.04 (  -37.50%)    0.05 (  -62.50%)    0.07 ( -112.50%)    0.04 (  -18.75%)\n+/-                 0.01 (    0.00%)    0.02 ( -146.64%)    0.02 (  -97.91%)    0.02 (  -75.59%)    0.02 (  -63.30%)\nElapsed Time      124.93 (    0.00%)  114.49 (    8.36%)   96.77 (   22.55%)   27.48 (   78.00%)  205.70 (  -64.65%)\n+/-                20.20 (    0.00%)   74.39 ( -268.34%)   59.88 ( -196.48%)    7.72 (   61.79%)   25.03 (  -23.95%)\nTHP Active        161.80 (    0.00%)   83.60 (   51.67%)  141.20 (   87.27%)   84.60 (   52.29%)   82.60 (   51.05%)\n+/-                71.95 (    0.00%)   43.80 (   60.88%)   26.91 (   37.40%)   59.02 (   82.03%)   52.13 (   72.45%)\nFault Alloc       471.40 (    0.00%)  228.60 (   48.49%)  282.20 (   59.86%)  225.20 (   47.77%)  388.40 (   82.39%)\n+/-                88.07 (    0.00%)   87.42 (   99.26%)   73.79 (   83.78%)  109.62 (  124.47%)   82.62 (   93.81%)\nFault Fallback    531.60 (    0.00%)  774.60 (  -45.71%)  720.80 (  -35.59%)  777.80 (  -46.31%)  614.80 (  -15.65%)\n+/-                88.07 (    0.00%)   87.26 (    0.92%)   73.79 (   16.22%)  109.62 (  -24.47%)   82.29 (    6.56%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)         50.22     33.76     30.65     24.14    128.45\nTotal Elapsed Time (seconds)               1113.73   1132.19   1029.45    759.49   1707.26\n\nSimilar test but the USB stick is using ext4 instead of vfat. As\next4 does not use writepage for migration, the large stalls due to\ncompaction when THP is enabled are not observed. Still, isolating\nPageReclaim pages on their own list helped completion time largely\nby reducing the number of pages scanned by direct reclaim although\ntime spend in congestion_wait could also be a factor.\n\nAgain, Andrea\u0027s series had far higher success rates for THP allocation\nat the cost of elapsed time. I didn\u0027t look too closely but a quick\nlook at the vmstat figures tells me kswapd reclaimed 8 times more pages\nthan the patch series and direct reclaim reclaimed roughly three times\nas many pages. It follows that if memory is aggressively reclaimed,\nthere will be more available for THP.\n\nwritebackCPFilevfat\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.76 (    0.00%)   29.10 (-1555.52%)   46.01 (-2517.18%)    4.79 ( -172.35%)   54.89 (-3022.53%)\n+/-                 0.14 (    0.00%)   25.61 (-18185.17%)    2.15 (-1434.83%)    6.60 (-4610.03%)    9.75\n(-6863.76%)\nUser Time           0.05 (    0.00%)    0.07 (  -45.83%)    0.05 (   -4.17%)    0.06 (  -29.17%)    0.06 (  -16.67%)\n+/-                 0.02 (    0.00%)    0.02 (   20.11%)    0.02 (   -3.14%)    0.01 (   31.58%)    0.01 (   47.41%)\nElapsed Time     22520.79 (    0.00%) 1082.85 (   95.19%)   73.30 (   99.67%)   32.43 (   99.86%)  291.84 (  98.70%)\n+/-              7277.23 (    0.00%)  706.29 (   90.29%)   19.05 (   99.74%)   17.05 (   99.77%)  125.55 (   98.27%)\nTHP Active         83.80 (    0.00%)   12.80 (   15.27%)   15.60 (   18.62%)   13.00 (   15.51%)    0.80 (    0.95%)\n+/-                66.81 (    0.00%)   20.19 (   30.22%)    5.92 (    8.86%)   15.06 (   22.54%)    1.17 (    1.75%)\nFault Alloc       171.00 (    0.00%)   67.80 (   39.65%)   97.40 (   56.96%)  125.60 (   73.45%)  133.00 (   77.78%)\n+/-                82.91 (    0.00%)   30.69 (   37.02%)   53.91 (   65.02%)   55.05 (   66.40%)   21.19 (   25.56%)\nFault Fallback    832.00 (    0.00%)  935.20 (  -12.40%)  906.00 (   -8.89%)  877.40 (   -5.46%)  870.20 (   -4.59%)\n+/-                82.91 (    0.00%)   30.69 (   62.98%)   54.01 (   34.86%)   55.05 (   33.60%)   20.91 (   74.78%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)       7229.81    928.42    704.52     80.68   1330.76\nTotal Elapsed Time (seconds)             112849.04   5618.69    571.11    360.54   1664.28\n\nIn this case, the test is reading/writing only from filesystems but as\nit\u0027s vfat, it\u0027s slow due to calling writepage during compaction. Little\nto observe really - the time to complete the test goes way down\nwith the series applied and THP allocation success rates go up in\ncomparison to 3.2-rc5.  The success rates are lower than 3.1.0 but\nthe elapsed time for that kernel is abysmal so it is not really a\nsensible comparison.\n\nAs before, Andrea\u0027s series allocates more THPs at the cost of overall\nperformance.\n\nwritebackCPFileext4\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.51 (    0.00%)    1.77 (  -17.66%)    1.46 (    2.92%)    1.15 (   23.77%)    1.89 (  -25.63%)\n+/-                 0.27 (    0.00%)    0.67 ( -148.52%)    0.33 (  -22.76%)    0.30 (  -11.15%)    0.19 (   30.16%)\nUser Time           0.03 (    0.00%)    0.04 (  -37.50%)    0.05 (  -62.50%)    0.07 ( -112.50%)    0.04 (  -18.75%)\n+/-                 0.01 (    0.00%)    0.02 ( -146.64%)    0.02 (  -97.91%)    0.02 (  -75.59%)    0.02 (  -63.30%)\nElapsed Time      124.93 (    0.00%)  114.49 (    8.36%)   96.77 (   22.55%)   27.48 (   78.00%)  205.70 (  -64.65%)\n+/-                20.20 (    0.00%)   74.39 ( -268.34%)   59.88 ( -196.48%)    7.72 (   61.79%)   25.03 (  -23.95%)\nTHP Active        161.80 (    0.00%)   83.60 (   51.67%)  141.20 (   87.27%)   84.60 (   52.29%)   82.60 (   51.05%)\n+/-                71.95 (    0.00%)   43.80 (   60.88%)   26.91 (   37.40%)   59.02 (   82.03%)   52.13 (   72.45%)\nFault Alloc       471.40 (    0.00%)  228.60 (   48.49%)  282.20 (   59.86%)  225.20 (   47.77%)  388.40 (   82.39%)\n+/-                88.07 (    0.00%)   87.42 (   99.26%)   73.79 (   83.78%)  109.62 (  124.47%)   82.62 (   93.81%)\nFault Fallback    531.60 (    0.00%)  774.60 (  -45.71%)  720.80 (  -35.59%)  777.80 (  -46.31%)  614.80 (  -15.65%)\n+/-                88.07 (    0.00%)   87.26 (    0.92%)   73.79 (   16.22%)  109.62 (  -24.47%)   82.29 (    6.56%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)         50.22     33.76     30.65     24.14    128.45\nTotal Elapsed Time (seconds)               1113.73   1132.19   1029.45    759.49   1707.26\n\nSame type of story - elapsed times go down. In this case, allocation\nsuccess rates are roughtly the same. As before, Andrea\u0027s has higher\nsuccess rates but takes a lot longer.\n\nOverall the series does reduce latencies and while the tests are\ninherency racy as alloc competes with the cp processes, the variability\nwas included. The THP allocation rates are not as high as they could\nbe but that is because we would have to be more aggressive about\nreclaim and compaction impacting overall performance.\n\nThis patch:\n\nCommit 39deaf85 (\"mm: compaction: make isolate_lru_page() filter-aware\")\nnoted that compaction does not migrate dirty or writeback pages and that\nis was meaningless to pick the page and re-add it to the LRU list.\n\nWhat was missed during review is that asynchronous migration moves dirty\npages if their -\u003emigratepage callback is migrate_page() because these can\nbe moved without blocking.  This potentially impacted hugepage allocation\nsuccess rates by a factor depending on how many dirty pages are in the\nsystem.\n\nThis patch partially reverts 39deaf85 to allow migration to isolate dirty\npages again.  This increases how much compaction disrupts the LRU but that\nis addressed later in the series.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nCc: Jan Kara \u003cjack@suse.cz\u003e\nCc: Andy Isaacson \u003cadi@hexapodia.org\u003e\nCc: Nai Xia \u003cnai.xia@gmail.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "31b8384a555d94c78e2ea2284a323cb985441f60",
      "tree": "6e9b3fc9d14e7bbd8c6c97a1277fd3e9b5034f5b",
      "parents": [
        "e3a41a5ba9c2ab988b9f1442925109dca2382fd9"
      ],
      "author": {
        "name": "Hillf Danton",
        "email": "dhillf@gmail.com",
        "time": "Tue Jan 10 15:07:59 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 10 16:30:44 2012 -0800"
      },
      "message": "mm: compaction: push isolate search base of compact control one pfn ahead\n\nAfter isolated the current pfn will no longer be scanned and isolated if\nthe next round is necessary, so push the isolate_migratepages search base\nof the given compact_control one step ahead.\n\nSigned-off-by: Hillf Danton \u003cdhillf@gmail.com\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "10fbcf4c6cb122005cdf36fc24d7683da92c7a27",
      "tree": "1a2ad572b421d576e14dbf006ecb321a53063f0c",
      "parents": [
        "8a25a2fd126c621f44f3aeaef80d51f00fc11639"
      ],
      "author": {
        "name": "Kay Sievers",
        "email": "kay.sievers@vrfy.org",
        "time": "Wed Dec 21 14:48:43 2011 -0800"
      },
      "committer": {
        "name": "Greg Kroah-Hartman",
        "email": "gregkh@suse.de",
        "time": "Wed Dec 21 14:48:43 2011 -0800"
      },
      "message": "convert \u0027memory\u0027 sysdev_class to a regular subsystem\n\nThis moves the \u0027memory sysdev_class\u0027 over to a regular \u0027memory\u0027 subsystem\nand converts the devices to regular devices. The sysdev drivers are\nimplemented as subsystem interfaces now.\n\nAfter all sysdev classes are ported to regular driver core entities, the\nsysdev implementation will be entirely removed from the kernel.\n\nSigned-off-by: Kay Sievers \u003ckay.sievers@vrfy.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n"
    },
    {
      "commit": "d43a87e68e9e71d2987a29cc239acec4e8f410c9",
      "tree": "75b2950b286dcad4c4e7785f991ab0a35146b8d1",
      "parents": [
        "dd73e85f6d8f721d66bcbd2734a5f4bc3d3cd768"
      ],
      "author": {
        "name": "Kyungmin Park",
        "email": "kyungmin.park@samsung.com",
        "time": "Mon Oct 31 17:09:08 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:49 2011 -0700"
      },
      "message": "mm: compaction: make compact_zone_order() static\n\nThere\u0027s no compact_zone_order() user outside file scope, so make it static.\n\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "39deaf8585152f1a35c1676d3d7dc6ae0fb65967",
      "tree": "a7509ea61c2f1028ed7ef961aa1abd16d50905f9",
      "parents": [
        "4356f21d09283dc6d39a6f7287a65ddab61e2808"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Mon Oct 31 17:06:51 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:44 2011 -0700"
      },
      "message": "mm: compaction: make isolate_lru_page() filter-aware\n\nIn async mode, compaction doesn\u0027t migrate dirty or writeback pages.  So,\nit\u0027s meaningless to pick the page and re-add it to lru list.\n\nOf course, when we isolate the page in compaction, the page might be dirty\nor writeback but when we try to migrate the page, the page would be not\ndirty, writeback.  So it could be migrated.  But it\u0027s very unlikely as\nisolate and migration cycle is much faster than writeout.\n\nSo, this patch helps cpu overhead and prevent unnecessary LRU churning.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4356f21d09283dc6d39a6f7287a65ddab61e2808",
      "tree": "34822a1662ea83291455834556a4fb5bf98ecd72",
      "parents": [
        "b9e84ac1536d35aee03b2601f19694949f0bd506"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Mon Oct 31 17:06:47 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:44 2011 -0700"
      },
      "message": "mm: change isolate mode from #define to bitwise type\n\nChange ISOLATE_XXX macro with bitwise isolate_mode_t type.  Normally,\nmacro isn\u0027t recommended as it\u0027s type-unsafe and making debugging harder as\nsymbol cannot be passed throught to the debugger.\n\nQuote from Johannes\n\" Hmm, it would probably be cleaner to fully convert the isolation mode\ninto independent flags.  INACTIVE, ACTIVE, BOTH is currently a\ntri-state among flags, which is a bit ugly.\"\n\nThis patch moves isolate mode from swap.h to mmzone.h by memcontrol.h\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b9e84ac1536d35aee03b2601f19694949f0bd506",
      "tree": "822eb1802818954248efc5cf67dc9a8a0ace5908",
      "parents": [
        "fcf634098c00dd9cd247447368495f0b79be12d1"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Mon Oct 31 17:06:44 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 31 17:30:44 2011 -0700"
      },
      "message": "mm: compaction: trivial clean up in acct_isolated()\n\nacct_isolated of compaction uses page_lru_base_type which returns only\nbase type of LRU list so it never returns LRU_ACTIVE_ANON or\nLRU_ACTIVE_FILE.  In addtion, cc-\u003enr_[anon|file] is used in only\nacct_isolated so it doesn\u0027t have fields in conpact_control.\n\nThis patch removes fields from compact_control and makes clear function of\nacct_issolated which counts the number of anon|file pages isolated.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f9e35b3b41f47c4e17d8132edbcab305a6aaa4b0",
      "tree": "d489fff3885bb7c4df0eebd2f074a398420740e6",
      "parents": [
        "d179e84ba5da1d0024087d1759a2938817a00f3f"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Wed Jun 15 15:08:52 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:02 2011 -0700"
      },
      "message": "mm: compaction: abort compaction if too many pages are isolated and caller is asynchronous V2\n\nAsynchronous compaction is used when promoting to huge pages.  This is all\nvery nice but if there are a number of processes in compacting memory, a\nlarge number of pages can be isolated.  An \"asynchronous\" process can\nstall for long periods of time as a result with a user reporting that\nfirefox can stall for 10s of seconds.  This patch aborts asynchronous\ncompaction if too many pages are isolated as it\u0027s better to fail a\nhugepage promotion than stall a process.\n\n[minchan.kim@gmail.com: return COMPACT_PARTIAL for abort]\nReported-and-tested-by: Ury Stankevich \u003curykhy@gmail.com\u003e\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7454f4ba40b419eb999a3c61a99da662bf1a2bb8",
      "tree": "e0c12088e544378554bc371d99f497d93470c4c4",
      "parents": [
        "a582a738c763e106f47eab24b8146c698a9c700b"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Wed Jun 15 15:08:50 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:02 2011 -0700"
      },
      "message": "mm: compaction: ensure that the compaction free scanner does not move to the next zone\n\nCompaction works with two scanners, a migration and a free scanner.  When\nthe scanners crossover, migration within the zone is complete.  The\nlocation of the scanner is recorded on each cycle to avoid excesive\nscanning.\n\nWhen a zone is small and mostly reserved, it\u0027s very easy for the migration\nscanner to be close to the end of the zone.  Then the following situation\ncan occurs\n\n  o migration scanner isolates some pages near the end of the zone\n  o free scanner starts at the end of the zone but finds that the\n    migration scanner is already there\n  o free scanner gets reinitialised for the next cycle as\n    cc-\u003emigrate_pfn + pageblock_nr_pages\n    moving the free scanner into the next zone\n  o migration scanner moves into the next zone\n\nWhen this happens, NR_ISOLATED accounting goes haywire because some of the\naccounting happens against the wrong zone.  One zones counter remains\npositive while the other goes negative even though the overall global\ncount is accurate.  This was reported on X86-32 with !SMP because !SMP\nallows the negative counters to be visible.  The fact that it is the bug\nshould theoritically be possible there.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a582a738c763e106f47eab24b8146c698a9c700b",
      "tree": "aaa5eda6bae7adc04dc5cbd513f5c25ac684af97",
      "parents": [
        "5db8a73a8d7cc6a66afbf25ed7fda338caa8f5f9"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shaohua.li@intel.com",
        "time": "Wed Jun 15 15:08:49 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:02 2011 -0700"
      },
      "message": "compaction: checks correct fragmentation index\n\nfragmentation_index() returns -1000 when the allocation might succeed\nThis doesn\u0027t match the comment and code in compaction_suitable(). I\nthought compaction_suitable should return COMPACT_PARTIAL in -1000\ncase, because in this case allocation could succeed depending on\nwatermarks.\n\nThe impact of this is that compaction starts and compact_finished() is\ncalled which rechecks the watermarks and the free lists.  It should have\nthe same result in that compaction should not start but is more expensive.\n\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3957c7768e5ea02fd3345176ddd340f820e5d285",
      "tree": "b3cbefeea3ac3adea0ca9d49e140503c9e5754b6",
      "parents": [
        "5f1a19070b16c20cdc71ed0e981bfa19f8f6a4ee"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Wed Jun 15 15:08:25 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:00 2011 -0700"
      },
      "message": "mm: compaction: fix special case -1 order checks\n\nCommit 56de7263fcf3 (\"mm: compaction: direct compact when a high-order\nallocation fails\") introduced a check for cc-\u003eorder \u003d\u003d -1 in\ncompact_finished.  We should continue compacting in that case because\nthe request came from userspace and there is no particular order to\ncompact for.  Similar check has been added by 82478fb7 (mm: compaction:\nprevent division-by-zero during user-requested compaction) for\ncompaction_suitable.\n\nThe check is, however, done after zone_watermark_ok which uses order as a\nright hand argument for shifts.  Not only watermark check is pointless if\nwe can break out without it but it also uses 1 \u003c\u003c -1 which is not well\ndefined (at least from C standard).  Let\u0027s move the -1 check above\nzone_watermark_ok.\n\n[minchan.kim@gmail.com\u003e - caught compaction_suitable]\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hioryu@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b2eef8c0d09101bbbff2531c097543aedde0b525",
      "tree": "ba0cbc88a8f66dc53c915509d90b3c4eeae8e7f1",
      "parents": [
        "602605a42ea4c299aeed4d806c49fb9dd18cd204"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Tue Mar 22 16:33:10 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:05 2011 -0700"
      },
      "message": "mm: compaction: minimise the time IRQs are disabled while isolating pages for migration\n\ncompaction_alloc() isolates pages for migration in isolate_migratepages.\nWhile it\u0027s scanning, IRQs are disabled on the mistaken assumption the\nscanning should be short.  Tests show this to be true for the most part\nbut contention times on the LRU lock can be increased.  Before this patch,\nthe IRQ disabled times for a simple test looked like\n\n  Total sampled time IRQs off (not real total time): 5493\n  Event shrink_inactive_list..shrink_zone                  1596 us count 1\n  Event shrink_inactive_list..shrink_zone                  1530 us count 1\n  Event shrink_inactive_list..shrink_zone                   956 us count 1\n  Event shrink_inactive_list..shrink_zone                   541 us count 1\n  Event shrink_inactive_list..shrink_zone                   531 us count 1\n  Event split_huge_page..add_to_swap                        232 us count 1\n  Event save_args..call_softirq                              36 us count 1\n  Event save_args..call_softirq                              35 us count 2\n  Event __wake_up..__wake_up                                  1 us count 1\n\nThis patch reduces the worst-case IRQs-disabled latencies by releasing the\nlock every SWAP_CLUSTER_MAX pages that are scanned and releasing the CPU if\nnecessary. The cost of this is that the processing performing compaction will\nbe slower but IRQs being disabled for too long a time has worse consequences\nas the following report shows;\n\n  Total sampled time IRQs off (not real total time): 4367\n  Event shrink_inactive_list..shrink_zone                   881 us count 1\n  Event shrink_inactive_list..shrink_zone                   875 us count 1\n  Event shrink_inactive_list..shrink_zone                   868 us count 1\n  Event shrink_inactive_list..shrink_zone                   555 us count 1\n  Event split_huge_page..add_to_swap                        495 us count 1\n  Event compact_zone..compact_zone_order                    269 us count 1\n  Event split_huge_page..add_to_swap                        266 us count 1\n  Event shrink_inactive_list..shrink_zone                    85 us count 1\n  Event save_args..call_softirq                              36 us count 2\n  Event __wake_up..__wake_up                                  1 us count 1\n\n[akpm@linux-foundation.org: simplify with s/unlocked/locked/]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Arthur Marsh \u003carthur.marsh@internode.on.net\u003e\nCc: Clemens Ladisch \u003ccladisch@googlemail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "602605a42ea4c299aeed4d806c49fb9dd18cd204",
      "tree": "55e98c0f8d1418248ec06b9f059d2713422e596a",
      "parents": [
        "5b280c0cc70062967bb9d630b216375b18db3a0b"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Tue Mar 22 16:33:08 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:05 2011 -0700"
      },
      "message": "mm: compaction: minimise the time IRQs are disabled while isolating free pages\n\ncompaction_alloc() isolates free pages to be used as migration targets.\nWhile its scanning, IRQs are disabled on the mistaken assumption the\nscanning should be short.  Analysis showed that IRQs were in fact being\ndisabled for substantial time.  A simple test was run using large\nanonymous mappings with transparent hugepage support enabled to trigger\nfrequent compactions.  A monitor sampled what the worst IRQ-off latencies\nwere and a post-processing tool found the following;\n\n  Total sampled time IRQs off (not real total time): 22355\n  Event compaction_alloc..compaction_alloc                 8409 us count 1\n  Event compaction_alloc..compaction_alloc                 7341 us count 1\n  Event compaction_alloc..compaction_alloc                 2463 us count 1\n  Event compaction_alloc..compaction_alloc                 2054 us count 1\n  Event shrink_inactive_list..shrink_zone                  1864 us count 1\n  Event shrink_inactive_list..shrink_zone                    88 us count 1\n  Event save_args..call_softirq                              36 us count 1\n  Event save_args..call_softirq                              35 us count 2\n  Event __make_request..__blk_run_queue                      24 us count 1\n  Event __alloc_pages_nodemask..__alloc_pages_nodemask        6 us count 1\n\ni.e.  compaction is disabled IRQs for a prolonged period of time - 8ms in\none instance.  The full report generated by the tool can be found at\n\n http://www.csn.ul.ie/~mel/postings/minfree-20110225/irqsoff-vanilla-micro.report\n\nThis patch reduces the time IRQs are disabled by simply disabling IRQs at\nthe last possible minute.  An updated IRQs-off summary report then looks\nlike;\n\n  Total sampled time IRQs off (not real total time): 5493\n  Event shrink_inactive_list..shrink_zone                  1596 us count 1\n  Event shrink_inactive_list..shrink_zone                  1530 us count 1\n  Event shrink_inactive_list..shrink_zone                   956 us count 1\n  Event shrink_inactive_list..shrink_zone                   541 us count 1\n  Event shrink_inactive_list..shrink_zone                   531 us count 1\n  Event split_huge_page..add_to_swap                        232 us count 1\n  Event save_args..call_softirq                              36 us count 1\n  Event save_args..call_softirq                              35 us count 2\n  Event __wake_up..__wake_up                                  1 us count 1\n\nA full report is again available at\n\n  http://www.csn.ul.ie/~mel/postings/minfree-20110225/irqsoff-minimiseirq-free-v1r4-micro.report\n\nAs should be obvious, IRQ disabled latencies due to compaction are\nalmost elimimnated for this particular test.\n\n[aarcange@redhat.com: Fix initialisation of isolated]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujisu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Arthur Marsh \u003carthur.marsh@internode.on.net\u003e\nCc: Clemens Ladisch \u003ccladisch@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9d502c1c8d47b337c378c2ac8eaeee7918ad16b1",
      "tree": "2bd7b5213369a509220864868d593f4ab4e5ebd1",
      "parents": [
        "d527caf22e48480b102c7c6ee5b9ba12170148f7"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Tue Mar 22 16:30:39 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:00 2011 -0700"
      },
      "message": "mm/compaction: check migrate_pages\u0027s return value instead of list_empty()\n\nMany migrate_page\u0027s caller check return value instead of list_empy by\ncf608ac19c (\"mm: compaction: fix COMPACTPAGEFAILED counting\").  This patch\nmakes compaction\u0027s migrate_pages consistent with others.  This patch\nshould not change old behavior.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d527caf22e48480b102c7c6ee5b9ba12170148f7",
      "tree": "7d53a2c430f8c020b6fa8390396dd2d1ce480b9a",
      "parents": [
        "89699605fe7cfd8611900346f61cb6cbf179b10a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Tue Mar 22 16:30:38 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:00 2011 -0700"
      },
      "message": "mm: compaction: prevent kswapd compacting memory to reduce CPU usage\n\nThis patch reverts 5a03b051 (\"thp: use compaction in kswapd for GFP_ATOMIC\norder \u003e 0\") due to reports stating that kswapd CPU usage was higher and\nIRQs were being disabled more frequently.  This was reported at\nhttp://www.spinics.net/linux/fedora/alsa-user/msg09885.html.\n\nWithout this patch applied, CPU usage by kswapd hovers around the 20% mark\naccording to the tester (Arthur Marsh:\nhttp://www.spinics.net/linux/fedora/alsa-user/msg09899.html).  With this\npatch applied, it\u0027s around 2%.\n\nThe problem is not related to THP which specifies __GFP_NO_KSWAPD but is\ntriggered by high-order allocations hitting the low watermark for their\norder and waking kswapd on kernels with CONFIG_COMPACTION set.  The most\ncommon trigger for this is network cards configured for jumbo frames but\nit\u0027s also possible it\u0027ll be triggered by fork-heavy workloads (order-1)\nand some wireless cards which depend on order-1 allocations.\n\nThe symptoms for the user will be high CPU usage by kswapd in low-memory\nsituations which could be confused with another writeback problem.  While\na patch like 5a03b051 may be reintroduced in the future, this patch plays\nit safe for now and reverts it.\n\n[mel@csn.ul.ie: Beefed up the changelog]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReported-by: Arthur Marsh \u003carthur.marsh@internode.on.net\u003e\nTested-by: Arthur Marsh \u003carthur.marsh@internode.on.net\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.38.1]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "82478fb7bca28e3ca2f3c55c14e690f749dd4dbb",
      "tree": "71023f480667dc3bfd255673437c76db77a05aa0",
      "parents": [
        "3305de51bf612603c9a4e4dc98ceb839ef933749"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 20 14:44:21 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 20 17:02:05 2011 -0800"
      },
      "message": "mm: compaction: prevent division-by-zero during user-requested compaction\n\nUp until 3e7d344 (\"mm: vmscan: reclaim order-0 and use compaction instead\nof lumpy reclaim\"), compaction skipped calculating the fragmentation index\nof a zone when compaction was explicitely requested through the procfs\nknob.\n\nHowever, when compaction_suitable was introduced, it did not come with an\nextra check for order \u003d\u003d -1, set on explicit compaction requests, and\npassed this order on to the fragmentation index calculation, where it\novershifts the number of requested pages, leading to a division by zero.\n\nThis patch makes sure that order \u003d\u003d -1 is recognized as the flag it is\nrather than passing it along as valid order parameter.\n\n[akpm@linux-foundation.org: add comment, per Mel]\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c5a73c3d55be1faadba35b41a862e036a3b12ddb",
      "tree": "65cd54e5995b6dae2edd80393f9c0317a0a11ebc",
      "parents": [
        "5a03b051ed87e72b959f32a86054e1142ac4cf55"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:11 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: use compaction for all allocation orders\n\nIt makes no sense not to enable compaction for small order pages as we\ndon\u0027t want to end up with bad order 2 allocations and good and graceful\norder 9 allocations.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5a03b051ed87e72b959f32a86054e1142ac4cf55",
      "tree": "31f0e8efb86d48b0292f8a7ea4bd9cf7c930a0ab",
      "parents": [
        "878aee7d6b5504e01b9caffce080e792b6b8d090"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:11 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: use compaction in kswapd for GFP_ATOMIC order \u003e 0\n\nThis takes advantage of memory compaction to properly generate pages of\norder \u003e 0 if regular page reclaim fails and priority level becomes more\nsevere and we don\u0027t reach the proper watermarks.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bc835011afbea3957217ee716093d791fb2fe44f",
      "tree": "50d1f2ffb4c1ff8cef4c9fb7fb115faeed0d0339",
      "parents": [
        "5d6892407cab23d4bf2f6de065ca351a53849323"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:08 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: transhuge isolate_migratepages()\n\nIt\u0027s not worth migrating transparent hugepages during compaction.  Those\nhugepages don\u0027t create fragmentation.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9927af740b1b9b1e769310bd0b91425e8047b803",
      "tree": "5195dfbe36ece987f7e3d7c04b87327a20b16ea6",
      "parents": [
        "7f0f24967b0349798803260b2e4bf347cffa1990"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:59 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: compaction: perform a faster migration scan when migrating asynchronously\n\ntry_to_compact_pages() is initially called to only migrate pages\nasychronously and kswapd always compacts asynchronously.  Both are being\noptimistic so it is important to complete the work as quickly as possible\nto minimise stalls.\n\nThis patch alters the scanner when asynchronous to only consider\nMIGRATE_MOVABLE pageblocks as migration candidates.  This reduces stalls\nwhen allocating huge pages while not impairing allocation success rates as\na full scan will be performed if necessary after direct reclaim.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7f0f24967b0349798803260b2e4bf347cffa1990",
      "tree": "80448367dd2403f02e74f90671e1f050aea41292",
      "parents": [
        "77f1fe6b08b13a87391549c8a820ddc817b6f50e"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:58 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: migration: cleanup migrate_pages API by matching types for offlining and sync\n\nWith the introduction of the boolean sync parameter, the API looks a\nlittle inconsistent as offlining is still an int.  Convert offlining to a\nbool for the sake of being tidy.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "77f1fe6b08b13a87391549c8a820ddc817b6f50e",
      "tree": "720865bd0994da3787b6f37d33b2ee4c26a2de6c",
      "parents": [
        "3e7d344970673c5334cf7b5bb27c8c0942b06126"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:57 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: migration: allow migration to operate asynchronously and avoid synchronous compaction in the faster path\n\nMigration synchronously waits for writeback if the initial passes fails.\nCallers of memory compaction do not necessarily want this behaviour if the\ncaller is latency sensitive or expects that synchronous migration is not\ngoing to have a significantly better success rate.\n\nThis patch adds a sync parameter to migrate_pages() allowing the caller to\nindicate if wait_on_page_writeback() is allowed within migration or not.\nFor reclaim/compaction, try_to_compact_pages() is first called\nasynchronously, direct reclaim runs and then try_to_compact_pages() is\ncalled synchronously as there is a greater expectation that it\u0027ll succeed.\n\n[akpm@linux-foundation.org: build/merge fix]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3e7d344970673c5334cf7b5bb27c8c0942b06126",
      "tree": "832ecb4da5fd27efa5a503df5b96bfdee2a52ffd",
      "parents": [
        "ee64fc9354e515a79c7232cfde65c88ec627308b"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:56 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: vmscan: reclaim order-0 and use compaction instead of lumpy reclaim\n\nLumpy reclaim is disruptive.  It reclaims a large number of pages and\nignores the age of the pages it reclaims.  This can incur significant\nstalls and potentially increase the number of major faults.\n\nCompaction has reached the point where it is considered reasonably stable\n(meaning it has passed a lot of testing) and is a potential candidate for\ndisplacing lumpy reclaim.  This patch introduces an alternative to lumpy\nreclaim whe compaction is available called reclaim/compaction.  The basic\noperation is very simple - instead of selecting a contiguous range of\npages to reclaim, a number of order-0 pages are reclaimed and then\ncompaction is later by either kswapd (compact_zone_order()) or direct\ncompaction (__alloc_pages_direct_compact()).\n\n[akpm@linux-foundation.org: fix build]\n[akpm@linux-foundation.org: use conventional task_struct naming]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b7aba6984dc048503b69c2a885098cdd430832bf",
      "tree": "1f682189bd967feaf28c2978445c7ebe82116185",
      "parents": [
        "2d90508f638241a2e7422d884767398296ebe720"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:54 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: compaction: add trace events for memory compaction activity\n\nIn preparation for a patches promoting the use of memory compaction over\nlumpy reclaim, this patch adds trace points for memory compaction\nactivity.  Using them, we can monitor the scanning activity of the\nmigration and free page scanners as well as the number and success rates\nof pages passed to page migration.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dd9e5efe3aa9fc5b1ce484a531ecdba3a7a30bbf",
      "tree": "2ccf4d51b423706db976c5eab214d0e23195461b",
      "parents": [
        "90a8a73c06cc32b609a880d48449d7083327e11a"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Tue Dec 21 17:24:16 2010 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 22 19:43:33 2010 -0800"
      },
      "message": "mm/compaction.c: avoid double mem_cgroup_del_lru()\n\ndel_page_from_lru_list() already called mem_cgroup_del_lru().  So we must\nnot call it again.  It adds unnecessary overhead.\n\nIt was not a runtime bug because the TestClearPageCgroupAcctLRU() early in\nmem_cgroup_del_lru_list() will prevent any double-deletion, etc.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bc6930457460788e14b2c0808ed4632a1592bd61",
      "tree": "78e562bc90b3b99f1ba1dbc32c846127f10a67e3",
      "parents": [
        "1c24de60e50fb19b94d94225458da17c720f0729"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Thu Sep 09 16:38:00 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 09 18:57:24 2010 -0700"
      },
      "message": "mm: compaction: handle active and inactive fairly in too_many_isolated\n\nIram reported that compaction\u0027s too_many_isolated() loops forever.\n(http://www.spinics.net/lists/linux-mm/msg08123.html)\n\nThe meminfo when the situation happened was inactive anon is zero.  That\u0027s\nbecause the system has no memory pressure until then.  While all anon\npages were in the active lru, compaction could select active lru as well\nas inactive lru.  That\u0027s a different thing from vmscan\u0027s isolated.  So we\nhas been two too_many_isolated.\n\nWhile compaction can isolate pages in both active and inactive, current\nimplementation of too_many_isolated only considers inactive.  It made\nIram\u0027s problem.\n\nThis patch handles active and inactive fairly.  That\u0027s because we can\u0027t\nexpect where from and how many compaction would isolated pages.\n\nThis patch changes (nr_isolated \u003e nr_inactive) with\nnr_isolated \u003e (nr_active + nr_inactive) / 2.\n\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReported-by: Iram Shahzad \u003ciram.shahzad@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Wu Fengguang \u003cfengguang.wu@intel.com\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"
    },
    {
      "commit": "5e7719058079a1423ccce56148b0aaa56b2df821",
      "tree": "3666cb3d5540dcaa3d8e7df8c293a0ad603a181c",
      "parents": [
        "56de7263fcf3eb10c8dcdf8d59a9cec831795f3f"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Mon May 24 14:32:31 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 25 08:06:59 2010 -0700"
      },
      "message": "mm: compaction: add a tunable that decides when memory should be compacted and when it should be reclaimed\n\nThe kernel applies some heuristics when deciding if memory should be\ncompacted or reclaimed to satisfy a high-order allocation.  One of these\nis based on the fragmentation.  If the index is below 500, memory will not\nbe compacted.  This choice is arbitrary and not based on data.  To help\noptimise the system and set a sensible default for this value, this patch\nadds a sysctl extfrag_threshold.  The kernel will only compact memory if\nthe fragmentation index is above the extfrag_threshold.\n\n[randy.dunlap@oracle.com: Fix build errors when proc fs is not configured]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Randy Dunlap \u003crandy.dunlap@oracle.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "56de7263fcf3eb10c8dcdf8d59a9cec831795f3f",
      "tree": "164637c0b678e20adfdcec4129563d9234faf405",
      "parents": [
        "ed4a6d7f0676db50b5023cc01f6cda82a2f2a307"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Mon May 24 14:32:30 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 25 08:06:59 2010 -0700"
      },
      "message": "mm: compaction: direct compact when a high-order allocation fails\n\nOrdinarily when a high-order allocation fails, direct reclaim is entered\nto free pages to satisfy the allocation.  With this patch, it is\ndetermined if an allocation failed due to external fragmentation instead\nof low memory and if so, the calling process will compact until a suitable\npage is freed.  Compaction by moving pages in memory is considerably\ncheaper than paging out to disk and works where there are locked pages or\nno swap.  If compaction fails to free a page of a suitable size, then\nreclaim will still occur.\n\nDirect compaction returns as soon as possible.  As each block is\ncompacted, it is checked if a suitable page has been freed and if so, it\nreturns.\n\n[akpm@linux-foundation.org: Fix build errors]\n[aarcange@redhat.com: fix count_vm_event preempt in memory compaction direct reclaim]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ed4a6d7f0676db50b5023cc01f6cda82a2f2a307",
      "tree": "6496343ba964e105cf30f8703714471f22edc806",
      "parents": [
        "76ab0f530e4a01d4dc20cdc1d5e87753c579dc18"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Mon May 24 14:32:29 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 25 08:06:59 2010 -0700"
      },
      "message": "mm: compaction: add /sys trigger for per-node memory compaction\n\nAdd a per-node sysfs file called compact.  When the file is written to,\neach zone in that node is compacted.  The intention that this would be\nused by something like a job scheduler in a batch system before a job\nstarts so that the job can allocate the maximum number of hugepages\nwithout significant start-up cost.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "76ab0f530e4a01d4dc20cdc1d5e87753c579dc18",
      "tree": "8e1566df85e02f67876685c36d217fec4845f79f",
      "parents": [
        "748446bb6b5a9390b546af38ec899c868a9dbcf0"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Mon May 24 14:32:28 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 25 08:06:59 2010 -0700"
      },
      "message": "mm: compaction: add /proc trigger for memory compaction\n\nAdd a proc file /proc/sys/vm/compact_memory.  When an arbitrary value is\nwritten to the file, all zones are compacted.  The expected user of such a\ntrigger is a job scheduler that prepares the system before the target\napplication runs.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "748446bb6b5a9390b546af38ec899c868a9dbcf0",
      "tree": "4c27d0805a5e094b39ff938ad60dd270b953a79f",
      "parents": [
        "c175a0ce7584e5b498fff8cbdb9aa7912aa9fbba"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Mon May 24 14:32:27 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 25 08:06:59 2010 -0700"
      },
      "message": "mm: compaction: memory compaction core\n\nThis patch is the core of a mechanism which compacts memory in a zone by\nrelocating movable pages towards the end of the zone.\n\nA single compaction run involves a migration scanner and a free scanner.\nBoth scanners operate on pageblock-sized areas in the zone.  The migration\nscanner starts at the bottom of the zone and searches for all movable\npages within each area, isolating them onto a private list called\nmigratelist.  The free scanner starts at the top of the zone and searches\nfor suitable areas and consumes the free pages within making them\navailable for the migration scanner.  The pages isolated for migration are\nthen migrated to the newly isolated free pages.\n\n[aarcange@redhat.com: Fix unsafe optimisation]\n[mel@csn.ul.ie: do not schedule work on other CPUs for compaction]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
