)]}'
{
  "log": [
    {
      "commit": "83896fb5e51594281720d145164f866ba769abd5",
      "tree": "422ecdf66c63eebec522b8b59b18616fb3af091d",
      "parents": [
        "7a608572a282a74978e10fd6cd63090aebe29f5c"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 17 14:42:34 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 17 14:42:34 2011 -0800"
      },
      "message": "Revert \"mm: simplify code of swap.c\"\n\nThis reverts commit d8505dee1a87b8d41b9c4ee1325cd72258226fbc.\n\nChris Mason ended up chasing down some page allocation errors and pages\nstuck waiting on the IO scheduler, and was able to narrow it down to two\ncommits: commit 744ed1442757 (\"mm: batch activate_page() to reduce lock\ncontention\") and d8505dee1a87 (\"mm: simplify code of swap.c\").\n\nThis reverts the second one.\n\nReported-and-debugged-by: Chris Mason \u003cchris.mason@oracle.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Jens Axboe \u003cjaxboe@fusionio.com\u003e\nCc: linux-mm \u003clinux-mm@kvack.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7a608572a282a74978e10fd6cd63090aebe29f5c",
      "tree": "03e52f73d7c35ffcea8f46e14ec569da818a7631",
      "parents": [
        "9e8a462a0141b12e22c4a2f0c12e0542770401f0"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 17 14:42:19 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 17 14:42:19 2011 -0800"
      },
      "message": "Revert \"mm: batch activate_page() to reduce lock contention\"\n\nThis reverts commit 744ed1442757767ffede5008bb13e0805085902e.\n\nChris Mason ended up chasing down some page allocation errors and pages\nstuck waiting on the IO scheduler, and was able to narrow it down to two\ncommits: commit 744ed1442757 (\"mm: batch activate_page() to reduce lock\ncontention\") and d8505dee1a87 (\"mm: simplify code of swap.c\").\n\nThis reverts the first of them.\n\nReported-and-debugged-by: Chris Mason \u003cchris.mason@oracle.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Jens Axboe \u003cjaxboe@fusionio.com\u003e\nCc: linux-mm \u003clinux-mm@kvack.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b3697c0255d9d73eaaa4deb4512e3f0ff97b3b71",
      "tree": "59f7c5aa4c6ac509381071997f0888e2687cebd5",
      "parents": [
        "7e3d0eb0b028ed9e9384e6afcae2f22993bbdf25"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Sun Jan 16 13:10:39 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Jan 16 15:05:44 2011 -0800"
      },
      "message": "fix non-x86 build failure in pmdp_get_and_clear\n\npmdp_get_and_clear/pmdp_clear_flush/pmdp_splitting_flush were trapped as\nBUG() and they were defined only to diminish the risk of build issues on\nnot-x86 archs and to be consistent with the generic pte methods previously\ndefined in include/asm-generic/pgtable.h.\n\nBut they are causing more trouble than they were supposed to solve, so\nit\u0027s simpler not to define them when THP is off.\n\nThis is also correcting the export of pmdp_splitting_flush which is\ncurrently unused (x86 isn\u0027t using the generic implementation in\nmm/pgtable-generic.c and no other arch needs that [yet]).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSam Ravnborg \u003csam@ravnborg.org\u003e\nCc: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: \"Luck, Tony\" \u003ctony.luck@intel.com\u003e\nCc: James Bottomley \u003cJames.Bottomley@HansenPartnership.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "68a1b1955957e222d890f550d2a44ae598db3de9",
      "tree": "809e8420b4c54da4d179fa69aacc269020e486ec",
      "parents": [
        "597fb188cbee2d371246e1669bbc6051bb666aa9"
      ],
      "author": {
        "name": "H Hartley Sweeten",
        "email": "hartleys@visionengravers.com",
        "time": "Tue Jan 11 17:49:32 2011 -0600"
      },
      "committer": {
        "name": "Pekka Enberg",
        "email": "penberg@kernel.org",
        "time": "Sat Jan 15 13:28:36 2011 +0200"
      },
      "message": "mm/slab.c: make local symbols static\n\nLocal symbols should be static.\n\nSigned-off-by: H Hartley Sweeten \u003chsweeten@visionengravers.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: Pekka Enberg \u003cpenberg@cs.helsinki.fi\u003e\nCc: Matt Mackall \u003cmpm@selenic.com\u003e\nSigned-off-by: Pekka Enberg \u003cpenberg@kernel.org\u003e\n"
    },
    {
      "commit": "597fb188cbee2d371246e1669bbc6051bb666aa9",
      "tree": "fd9cb605050ca15274cf391dc6bd4073d04808df",
      "parents": [
        "38567333a6dabd0f2b4150e9fb6dd8e3ba2985e5",
        "04d94879c8a4973b5499dc26b9d38acee8928791"
      ],
      "author": {
        "name": "Pekka Enberg",
        "email": "penberg@kernel.org",
        "time": "Sat Jan 15 13:28:17 2011 +0200"
      },
      "committer": {
        "name": "Pekka Enberg",
        "email": "penberg@kernel.org",
        "time": "Sat Jan 15 13:28:17 2011 +0200"
      },
      "message": "Merge branch \u0027slub/hotplug\u0027 into slab/urgent\n"
    },
    {
      "commit": "52cfd503ad7176d23a5dd7af3981744feb60622f",
      "tree": "0a8aeaaf4acbc86ac682f18632b8070c1c6b7ba1",
      "parents": [
        "dc8e7e3ec60bd5ef7868aa88755e9d4c948dc5cc",
        "4263d9a3ae4d15785897d0543bb59316c84ee605"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 20:15:35 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 20:15:35 2011 -0800"
      },
      "message": "Merge branch \u0027release\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6\n\n* \u0027release\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (59 commits)\n  ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework\n  ACPI: fix resource check message\n  ACPI / Battery: Update information on info notification and resume\n  ACPI: Drop device flag wake_capable\n  ACPI: Always check if _PRW is present before trying to evaluate it\n  ACPI / PM: Check status of power resources under mutexes\n  ACPI / PM: Rename acpi_power_off_device()\n  ACPI / PM: Drop acpi_power_nocheck\n  ACPI / PM: Drop acpi_bus_get_power()\n  Platform / x86: Make fujitsu_laptop use acpi_bus_update_power()\n  ACPI / Fan: Rework the handling of power resources\n  ACPI / PM: Register power resource devices as soon as they are needed\n  ACPI / PM: Register acpi_power_driver early\n  ACPI / PM: Add function for updating device power state consistently\n  ACPI / PM: Add function for device power state initialization\n  ACPI / PM: Introduce __acpi_bus_get_power()\n  ACPI / PM: Introduce function for refcounting device power resources\n  ACPI / PM: Add functions for manipulating lists of power resources\n  ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes\n  ACPICA: Update version to 20101209\n  ...\n"
    },
    {
      "commit": "50de1dd967d4ba3b8a90ebe7a4f5feca24191317",
      "tree": "ed2aa4352ae3c2887a90ef6279588a7048397d1b",
      "parents": [
        "17295c88a160c6eea3fcf46cec9d08a0fcb02db9"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 13 15:47:43 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:51 2011 -0800"
      },
      "message": "memcg: fix memory migration of shmem swapcache\n\nIn the current implementation mem_cgroup_end_migration() decides whether\nthe page migration has succeeded or not by checking \"oldpage-\u003emapping\".\n\nBut if we are tring to migrate a shmem swapcache, the page-\u003emapping of it\nis NULL from the begining, so the check would be invalid.  As a result,\nmem_cgroup_end_migration() assumes the migration has succeeded even if\nit\u0027s not, so \"newpage\" would be freed while it\u0027s not uncharged.\n\nThis patch fixes it by passing mem_cgroup_end_migration() the result of\nthe page migration.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "17295c88a160c6eea3fcf46cec9d08a0fcb02db9",
      "tree": "35fe45824b5ddd6d406d2d7d7562438a4725e57e",
      "parents": [
        "dfe076b0971a783469bc2066e85d46e23c8acb1c"
      ],
      "author": {
        "name": "Jesper Juhl",
        "email": "jj@chaosbits.net",
        "time": "Thu Jan 13 15:47:42 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:51 2011 -0800"
      },
      "message": "memcg: use [kv]zalloc[_node] rather than [kv]malloc+memset\n\nIn mem_cgroup_alloc() we currently do either kmalloc() or vmalloc() then\nfollowed by memset() to zero the memory.  This can be more efficiently\nachieved by using kzalloc() and vzalloc().  There\u0027s also one situation\nwhere we can use kzalloc_node() - this is what\u0027s new in this version of\nthe patch.\n\nSigned-off-by: Jesper Juhl \u003cjj@chaosbits.net\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Li Zefan \u003clizf@cn.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": "dfe076b0971a783469bc2066e85d46e23c8acb1c",
      "tree": "ee0856c119ed898212da2555f936fb3284c5ff59",
      "parents": [
        "043d18b1e5bdfc4870b8a19d00f0d5c636a5c231"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 13 15:47:41 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:51 2011 -0800"
      },
      "message": "memcg: fix deadlock between cpuset and memcg\n\nCommit b1dd693e (\"memcg: avoid deadlock between move charge and\ntry_charge()\") can cause another deadlock about mmap_sem on task migration\nif cpuset and memcg are mounted onto the same mount point.\n\nAfter the commit, cgroup_attach_task() has sequence like:\n\ncgroup_attach_task()\n  ss-\u003ecan_attach()\n    cpuset_can_attach()\n    mem_cgroup_can_attach()\n      down_read(\u0026mmap_sem)        (1)\n  ss-\u003eattach()\n    cpuset_attach()\n      mpol_rebind_mm()\n        down_write(\u0026mmap_sem)     (2)\n        up_write(\u0026mmap_sem)\n      cpuset_migrate_mm()\n        do_migrate_pages()\n          down_read(\u0026mmap_sem)\n          up_read(\u0026mmap_sem)\n    mem_cgroup_move_task()\n      mem_cgroup_clear_mc()\n        up_read(\u0026mmap_sem)\n\nWe can cause deadlock at (2) because we\u0027ve already aquire the mmap_sem at (1).\n\nBut the commit itself is necessary to fix deadlocks which have existed\nbefore the commit like:\n\nEx.1)\n                move charge             |        try charge\n  --------------------------------------+------------------------------\n    mem_cgroup_can_attach()             |  down_write(\u0026mmap_sem)\n      mc.moving_task \u003d current          |    ..\n      mem_cgroup_precharge_mc()         |  __mem_cgroup_try_charge()\n        mem_cgroup_count_precharge()    |    prepare_to_wait()\n          down_read(\u0026mmap_sem)          |    if (mc.moving_task)\n          -\u003e cannot aquire the lock     |    -\u003e true\n                                        |      schedule()\n                                        |      -\u003e move charge should wake it up\n\nEx.2)\n                move charge             |        try charge\n  --------------------------------------+------------------------------\n    mem_cgroup_can_attach()             |\n      mc.moving_task \u003d current          |\n      mem_cgroup_precharge_mc()         |\n        mem_cgroup_count_precharge()    |\n          down_read(\u0026mmap_sem)          |\n          ..                            |\n          up_read(\u0026mmap_sem)            |\n                                        |  down_write(\u0026mmap_sem)\n    mem_cgroup_move_task()              |    ..\n      mem_cgroup_move_charge()          |  __mem_cgroup_try_charge()\n        down_read(\u0026mmap_sem)            |    prepare_to_wait()\n        -\u003e cannot aquire the lock       |    if (mc.moving_task)\n                                        |    -\u003e true\n                                        |      schedule()\n                                        |      -\u003e move charge should wake it up\n\nThis patch fixes all of these problems by:\n1. revert the commit.\n2. To fix the Ex.1, we set mc.moving_task after mem_cgroup_count_precharge()\n   has released the mmap_sem.\n3. To fix the Ex.2, we use down_read_trylock() instead of down_read() in\n   mem_cgroup_move_charge() and, if it has failed to aquire the lock, cancel\n   all extra charges, wake up all waiters, and retry trylock.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nReported-by: Ben Blum \u003cbblum@andrew.cmu.edu\u003e\nCc: Miao Xie \u003cmiaox@cn.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: Hiroyuki Kamezawa \u003ckamezawa.hiroyuki@gmail.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "043d18b1e5bdfc4870b8a19d00f0d5c636a5c231",
      "tree": "c2392e1fb2c1f7b23446ae4c59aa2d35134ab3d3",
      "parents": [
        "f3e8eb70b1807d1b30aa6972af0cf30077c40112"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Thu Jan 13 15:47:40 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "memcg: remove unnecessary return from void-returning mem_cgroup_del_lru_list()\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\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f3e8eb70b1807d1b30aa6972af0cf30077c40112",
      "tree": "5b541e4850fa6a9922b288e9efd7c632021657f6",
      "parents": [
        "dbd4ea78f002df283c95d9774837041735fa1bf9"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:39 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "memcg: fix unit mismatch in memcg oom limit calculation\n\nAdding the number of swap pages to the byte limit of a memory control\ngroup makes no sense.  Convert the pages to bytes before adding them.\n\nThe only user of this code is the OOM killer, and the way it is used means\nthat the error results in a higher OOM badness value.  Since the cgroup\nlimit is the same for all tasks in the cgroup, the error should have no\npractical impact at the moment.\n\nBut let\u0027s not wait for future or changing users to trip over it.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dbd4ea78f002df283c95d9774837041735fa1bf9",
      "tree": "e709c6c5c026b1c230bb87ddcfe8415aaf255820",
      "parents": [
        "2a7106f2cb0768d00fe8c1eb42a754a7d8518f08"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Thu Jan 13 15:47:38 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "memcg: add lock to synchronize page accounting and migration\n\nIntroduce a new bit spin lock, PCG_MOVE_LOCK, to synchronize the page\naccounting and migration code.  This reworks the locking scheme of\n_update_stat() and _move_account() by adding new lock bit PCG_MOVE_LOCK,\nwhich is always taken under IRQ disable.\n\n1. If pages are being migrated from a memcg, then updates to that\n   memcg page statistics are protected by grabbing PCG_MOVE_LOCK using\n   move_lock_page_cgroup().  In an upcoming commit, memcg dirty page\n   accounting will be updating memcg page accounting (specifically: num\n   writeback pages) from IRQ context (softirq).  Avoid a deadlocking\n   nested spin lock attempt by disabling irq on the local processor when\n   grabbing the PCG_MOVE_LOCK.\n\n2. lock for update_page_stat is used only for avoiding race with\n   move_account().  So, IRQ awareness of lock_page_cgroup() itself is not\n   a problem.  The problem is between mem_cgroup_update_page_stat() and\n   mem_cgroup_move_account_page().\n\nTrade-off:\n  * Changing lock_page_cgroup() to always disable IRQ (or\n    local_bh) has some impacts on performance and I think\n    it\u0027s bad to disable IRQ when it\u0027s not necessary.\n  * adding a new lock makes move_account() slower.  Score is\n    here.\n\nPerformance Impact: moving a 8G anon process.\n\nBefore:\n\treal    0m0.792s\n\tuser    0m0.000s\n\tsys     0m0.780s\n\nAfter:\n\treal    0m0.854s\n\tuser    0m0.000s\n\tsys     0m0.842s\n\nThis score is bad but planned patches for optimization can reduce\nthis impact.\n\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Greg Thelen \u003cgthelen@google.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nAcked-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Andrea Righi \u003carighi@develer.com\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2a7106f2cb0768d00fe8c1eb42a754a7d8518f08",
      "tree": "730bef06e752c1edcb2d475fd193f94bea00bf6a",
      "parents": [
        "ece72400c2a27a3d726cb0854449f991d9fcd2da"
      ],
      "author": {
        "name": "Greg Thelen",
        "email": "gthelen@google.com",
        "time": "Thu Jan 13 15:47:37 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "memcg: create extensible page stat update routines\n\nReplace usage of the mem_cgroup_update_file_mapped() memcg\nstatistic update routine with two new routines:\n* mem_cgroup_inc_page_stat()\n* mem_cgroup_dec_page_stat()\n\nAs before, only the file_mapped statistic is managed.  However, these more\ngeneral interfaces allow for new statistics to be more easily added.  New\nstatistics are added with memcg dirty page accounting.\n\nSigned-off-by: Greg Thelen \u003cgthelen@google.com\u003e\nSigned-off-by: Andrea Righi \u003carighi@develer.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nCc: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "744ed1442757767ffede5008bb13e0805085902e",
      "tree": "75af93524570b40056f2367059dfa84ba7d90186",
      "parents": [
        "d8505dee1a87b8d41b9c4ee1325cd72258226fbc"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shaohua.li@intel.com",
        "time": "Thu Jan 13 15:47:34 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "mm: batch activate_page() to reduce lock contention\n\nThe zone-\u003elru_lock is heavily contented in workload where activate_page()\nis frequently used.  We could do batch activate_page() to reduce the lock\ncontention.  The batched pages will be added into zone list when the pool\nis full or page reclaim is trying to drain them.\n\nFor example, in a 4 socket 64 CPU system, create a sparse file and 64\nprocesses, processes shared map to the file.  Each process read access the\nwhole file and then exit.  The process exit will do unmap_vmas() and cause\na lot of activate_page() call.  In such workload, we saw about 58% total\ntime reduction with below patch.  Other workloads with a lot of\nactivate_page also benefits a lot too.\n\nI tested some microbenchmarks:\ncase-anon-cow-rand-mt\t\t0.58%\ncase-anon-cow-rand\t\t-3.30%\ncase-anon-cow-seq-mt\t\t-0.51%\ncase-anon-cow-seq\t\t-5.68%\ncase-anon-r-rand-mt\t\t0.23%\ncase-anon-r-rand\t\t0.81%\ncase-anon-r-seq-mt\t\t-0.71%\ncase-anon-r-seq\t\t\t-1.99%\ncase-anon-rx-rand-mt\t\t2.11%\ncase-anon-rx-seq-mt\t\t3.46%\ncase-anon-w-rand-mt\t\t-0.03%\ncase-anon-w-rand\t\t-0.50%\ncase-anon-w-seq-mt\t\t-1.08%\ncase-anon-w-seq\t\t\t-0.12%\ncase-anon-wx-rand-mt\t\t-5.02%\ncase-anon-wx-seq-mt\t\t-1.43%\ncase-fork\t\t\t1.65%\ncase-fork-sleep\t\t\t-0.07%\ncase-fork-withmem\t\t1.39%\ncase-hugetlb\t\t\t-0.59%\ncase-lru-file-mmap-read-mt\t-0.54%\ncase-lru-file-mmap-read\t\t0.61%\ncase-lru-file-mmap-read-rand\t-2.24%\ncase-lru-file-readonce\t\t-0.64%\ncase-lru-file-readtwice\t\t-11.69%\ncase-lru-memcg\t\t\t-1.35%\ncase-mmap-pread-rand-mt\t\t1.88%\ncase-mmap-pread-rand\t\t-15.26%\ncase-mmap-pread-seq-mt\t\t0.89%\ncase-mmap-pread-seq\t\t-69.72%\ncase-mmap-xread-rand-mt\t\t0.71%\ncase-mmap-xread-seq-mt\t\t0.38%\n\nThe most significent are:\ncase-lru-file-readtwice\t\t-11.69%\ncase-mmap-pread-rand\t\t-15.26%\ncase-mmap-pread-seq\t\t-69.72%\n\nwhich use activate_page a lot.  others are basically variations because\neach run has slightly difference.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Andi Kleen \u003candi@firstfloor.org\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@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": "d8505dee1a87b8d41b9c4ee1325cd72258226fbc",
      "tree": "292c67a565c67495e78c8a403e2c2a74228d116b",
      "parents": [
        "c06b1fca18c3ad868bfcaca230146e3038583422"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shaohua.li@intel.com",
        "time": "Thu Jan 13 15:47:33 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:50 2011 -0800"
      },
      "message": "mm: simplify code of swap.c\n\nClean up code and remove duplicate code.  Next patch will use\npagevec_lru_move_fn introduced here too.\n\nSigned-off-by: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Andi Kleen \u003candi@firstfloor.org\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@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": "c06b1fca18c3ad868bfcaca230146e3038583422",
      "tree": "3f9efb869931a6c6055579524bff8ad6505d074b",
      "parents": [
        "fd4a4663db293bfd5dc20fb4113977f62895e550"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Thu Jan 13 15:47:32 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "mm/page_alloc.c: don\u0027t cache `current\u0027 in a local\n\nIt\u0027s old-fashioned and unneeded.\n\nakpm:/usr/src/25\u003e size mm/page_alloc.o\n   text    data     bss     dec     hex filename\n  39884 1241317   18808 1300009  13d629 mm/page_alloc.o (before)\n  39838 1241317   18808 1299963  13d5fb mm/page_alloc.o (after)\n\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "fd4a4663db293bfd5dc20fb4113977f62895e550",
      "tree": "a161c087d714042b5402b858b9a6ee75392ecab2",
      "parents": [
        "1ce82b69e96c838d007f316b8347b911fdfa9842"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:47:31 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "mm: fix hugepage migration\n\n2.6.37 added an unmap_and_move_huge_page() for memory failure recovery,\nbut its anon_vma handling was still based around the 2.6.35 conventions.\nUpdate it to use page_lock_anon_vma, get_anon_vma, page_unlock_anon_vma,\ndrop_anon_vma in the same way as we\u0027re now changing unmap_and_move().\n\nI don\u0027t particularly like to propose this for stable when I\u0027ve not seen\nits problems in practice nor tested the solution: but it\u0027s clearly out of\nsynch at present.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nCc: \"Jun\u0027ichi Nomura\" \u003cj-nomura@ce.jp.nec.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: \u003cstable@kernel.org\u003e [2.6.37, 2.6.36]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1ce82b69e96c838d007f316b8347b911fdfa9842",
      "tree": "be34e7c88a2544e620638834c8120b14b277d64a",
      "parents": [
        "2919bfd0758257c469abef8c26c3e516bbebb851"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:47:30 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "mm: fix migration hangs on anon_vma lock\n\nIncreased usage of page migration in mmotm reveals that the anon_vma\nlocking in unmap_and_move() has been deficient since 2.6.36 (or even\nearlier).  Review at the time of f18194275c39835cb84563500995e0d503a32d9a\n(\"mm: fix hang on anon_vma-\u003eroot-\u003elock\") missed the issue here: the\nanon_vma to which we get a reference may already have been freed back to\nits slab (it is in use when we check page_mapped, but that can change),\nand so its anon_vma-\u003eroot may be switched at any moment by reuse in\nanon_vma_prepare.\n\nPerhaps we could fix that with a get_anon_vma_unless_zero(), but let\u0027s\nnot: just rely on page_lock_anon_vma() to do all the hard thinking for us,\nthen we don\u0027t need any rcu read locking over here.\n\nIn removing the rcu_unlock label: since PageAnon is a bit in\npage-\u003emapping, it\u0027s impossible for a !page-\u003emapping page to be anon; but\ninsert VM_BUG_ON in case the implementation ever changes.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nReviewed-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nCc: \"Jun\u0027ichi Nomura\" \u003cj-nomura@ce.jp.nec.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: \u003cstable@kernel.org\u003e [2.6.37, 2.6.36]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2919bfd0758257c469abef8c26c3e516bbebb851",
      "tree": "093244c121dcbb91423f119cea9abc50e11ad078",
      "parents": [
        "73ae31e5986a4c0ee84bfd13ccd9b57a98956f6f"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:47:29 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "ksm: drain pagevecs to lru\n\nIt was hard to explain the page counts which were causing new LTP tests\nof KSM to fail: we need to drain the per-cpu pagevecs to LRU occasionally.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nReported-by: CAI Qian \u003ccaiqian@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": "73ae31e5986a4c0ee84bfd13ccd9b57a98956f6f",
      "tree": "03e8c6e4559d5f77ec8f0fdf79addeecbef65ed9",
      "parents": [
        "adbe8726dc2a3805630d517270db17e3af86e526"
      ],
      "author": {
        "name": "Eric B Munson",
        "email": "emunson@mgebm.net",
        "time": "Thu Jan 13 15:47:28 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "hugetlb: fix handling of parse errors in sysfs\n\nWhen parsing changes to the huge page pool sizes made from userspace via\nthe sysfs interface, bogus input values are being covered up by\nnr_hugepages_store_common and nr_overcommit_hugepages_store returning 0\nwhen strict_strtoul returns an error.  This can cause an infinite loop in\nthe nr_hugepages_store code.  This patch changes the return value for\nthese functions to -EINVAL when strict_strtoul returns an error.\n\nSigned-off-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nReported-by: CAI Qian \u003ccaiqian@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Nishanth Aravamudan \u003cnacc@us.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "adbe8726dc2a3805630d517270db17e3af86e526",
      "tree": "9558dc935030fa9eaec390ec56080d585b438f51",
      "parents": [
        "08d4a24659f1284f33e574211435aa12ce968477"
      ],
      "author": {
        "name": "Eric B Munson",
        "email": "emunson@mgebm.net",
        "time": "Thu Jan 13 15:47:27 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "hugetlb: do not allow pagesize \u003e\u003d MAX_ORDER pool adjustment\n\nHuge pages with order \u003e\u003d MAX_ORDER must be allocated at boot via the\nkernel command line, they cannot be allocated or freed once the kernel is\nup and running.  Currently we allow values to be written to the sysfs and\nsysctl files controling pool size for these huge page sizes.  This patch\nmakes the store functions for nr_hugepages and nr_overcommit_hugepages\nreturn -EINVAL when the pool for a page size \u003e\u003d MAX_ORDER is changed.\n\n[akpm@linux-foundation.org: avoid multiple return paths in nr_hugepages_store_common()]\n[caiqian@redhat.com: add checking in hugetlb_overcommit_handler()]\nSigned-off-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nReported-by: CAI Qian \u003ccaiqian@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Nishanth Aravamudan \u003cnacc@us.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "08d4a24659f1284f33e574211435aa12ce968477",
      "tree": "a3bfdee153157acd502452635aa33f842c0f97eb",
      "parents": [
        "cb9ef8d5e394f70db64bda79c20d3569a20d2574"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Thu Jan 13 15:47:26 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:49 2011 -0800"
      },
      "message": "hugetlb: check the return value of string conversion in sysctl handler\n\nproc_doulongvec_minmax may fail if the given buffer doesn\u0027t represent a\nvalid number.  If we provide something invalid we will initialize the\nresulting value (nr_overcommit_huge_pages in this case) to a random value\nfrom the stack.\n\nThe issue was introduced by a3d0c6aa when the default handler has been\nreplaced by the helper function where we do not check the return value.\n\nReproducer:\necho \"\" \u003e /proc/sys/vm/nr_overcommit_hugepages\n\n[akpm@linux-foundation.org: correctly propagate proc_doulongvec_minmax return code]\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: CAI Qian \u003ccaiqian@redhat.com\u003e\nCc: Nishanth Aravamudan \u003cnacc@us.ibm.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": "684265d4a30f133162f06ddb2e5010608e60e4bb",
      "tree": "f4eb3cab6bdbebf48360a8bc8696588483ac0e52",
      "parents": [
        "84bc227d7fde049a568cd58a5610613feedc0dff"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Thu Jan 13 15:47:25 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "mm/dmapool.c: use TASK_UNINTERRUPTIBLE in dma_pool_alloc()\n\nAs it stands this code will degenerate into a busy-wait if the calling task\nhas signal_pending().\n\nCc: Rolf Eike Beer \u003ceike-kernel@sf-tec.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "84bc227d7fde049a568cd58a5610613feedc0dff",
      "tree": "89957d8ef4dba3fe8d609bd90619f7bf6f15ec0f",
      "parents": [
        "43506fad21ca3d8dc59e768ff458f7c5e5c01086"
      ],
      "author": {
        "name": "Rolf Eike Beer",
        "email": "eike-kernel@sf-tec.de",
        "time": "Thu Jan 13 15:47:24 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "mm/dmapool.c: take lock only once in dma_pool_free()\n\ndma_pool_free() scans for the page to free in the pool list holding the\npool lock.  Then it releases the lock basically to acquire it immediately\nagain.  Modify the code to only take the lock once.\n\nThis will do some additional loops and computations with the lock held in\nif memory debugging is activated.  If it is not activated the only new\noperations with this lock is one if and one substraction.\n\nSigned-off-by: Rolf Eike Beer \u003ceike-kernel@sf-tec.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "43506fad21ca3d8dc59e768ff458f7c5e5c01086",
      "tree": "b594f240a780e3547341530fedabb6ac4735ff41",
      "parents": [
        "5520e89485252c759ee60d313e9422447659947b"
      ],
      "author": {
        "name": "KyongHo Cho",
        "email": "pullip.cho@samsung.com",
        "time": "Thu Jan 13 15:47:24 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "mm/page_alloc.c: simplify calculation of combined index of adjacent buddy lists\n\nThe previous approach of calucation of combined index was\n\n\tpage_idx \u0026 ~(1 \u003c\u003c order))\n\nbut we have same result with\n\n\tpage_idx \u0026 buddy_idx\n\nThis reduces instructions slightly as well as enhances readability.\n\n[akpm@linux-foundation.org: coding-style fixes]\n[akpm@linux-foundation.org: fix used-unintialised warning]\nSigned-off-by: KyongHo Cho \u003cpullip.cho@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": "5520e89485252c759ee60d313e9422447659947b",
      "tree": "cae55e5e44e86a19af4103ec129d887004d26b5b",
      "parents": [
        "32d6feadf4e17ea9b98071be9bbf402a74a4f818"
      ],
      "author": {
        "name": "Jiri Kosina",
        "email": "jkosina@suse.cz",
        "time": "Thu Jan 13 15:47:23 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "brk: fix min_brk lower bound computation for COMPAT_BRK\n\nEven if CONFIG_COMPAT_BRK is set in the kernel configuration, it can still\nbe overriden by randomize_va_space sysctl.\n\nIf this is the case, the min_brk computation in sys_brk() implementation\nis wrong, as it solely takes into account COMPAT_BRK setting, assuming\nthat brk start is not randomized.  But that might not be the case if\nrandomize_va_space sysctl has been set to \u00272\u0027 at the time the binary has\nbeen loaded from disk.\n\nIn such case, the check has to be done in a same way as in\n!CONFIG_COMPAT_BRK case.\n\nIn addition to that, the check for the COMPAT_BRK case introduced back in\na5b4592c (\"brk: make sys_brk() honor COMPAT_BRK when computing lower\nbound\") is slightly wrong -- the lower bound shouldn\u0027t be mm-\u003eend_code,\nbut mm-\u003eend_data instead, as that\u0027s where the legacy applications expect\nbrk section to start (i.e.  immediately after last global variable).\n\n[akpm@linux-foundation.org: fix comment]\nSigned-off-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\nCc: Geert Uytterhoeven \u003cgeert@linux-m68k.org\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "32d6feadf4e17ea9b98071be9bbf402a74a4f818",
      "tree": "62427ca91992c87399211fec6294533fac0e7464",
      "parents": [
        "29c1f677d424e8c5683a837fc4f03fc9f19201d7"
      ],
      "author": {
        "name": "Jesper Juhl",
        "email": "jj@chaosbits.net",
        "time": "Thu Jan 13 15:47:22 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "mm/hugetlb.c: fix error-path memory leak in nr_hugepages_store_common()\n\nThe NODEMASK_ALLOC macro may dynamically allocate memory for its second\nargument (\u0027nodes_allowed\u0027 in this context).\n\nIn nr_hugepages_store_common() we may abort early if strict_strtoul()\nfails, but in that case we do not free the memory already allocated to\n\u0027nodes_allowed\u0027, causing a memory leak.\n\nThis patch closes the leak by freeing the memory in the error path.\n\n[akpm@linux-foundation.org: use NODEMASK_FREE, per Minchan Kim]\nSigned-off-by: Jesper Juhl \u003cjj@chaosbits.net\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": "29c1f677d424e8c5683a837fc4f03fc9f19201d7",
      "tree": "97f257ab279cc000e02a1a58fa0869fb405f26cd",
      "parents": [
        "22e5c47ee238abe636655c3862ed28d6eb084ad4"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:47:21 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "mm: migration: use rcu_dereference_protected when dereferencing the radix tree slot during file page migration\n\nmigrate_pages() -\u003e unmap_and_move() only calls rcu_read_lock() for\nanonymous pages, as introduced by git commit\n989f89c57e6361e7d16fbd9572b5da7d313b073d (\"fix rcu_read_lock() in page\nmigraton\").  The point of the RCU protection there is part of getting a\nstable reference to anon_vma and is only held for anon pages as file pages\nare locked which is sufficient protection against freeing.\n\nHowever, while a file page\u0027s mapping is being migrated, the radix tree is\ndouble checked to ensure it is the expected page.  This uses\nradix_tree_deref_slot() -\u003e rcu_dereference() without the RCU lock held\ntriggering the following warning.\n\n[  173.674290] \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\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n[  173.676016] [ INFO: suspicious rcu_dereference_check() usage. ]\n[  173.676016] ---------------------------------------------------\n[  173.676016] include/linux/radix-tree.h:145 invoked rcu_dereference_check() without protection!\n[  173.676016]\n[  173.676016] other info that might help us debug this:\n[  173.676016]\n[  173.676016]\n[  173.676016] rcu_scheduler_active \u003d 1, debug_locks \u003d 0\n[  173.676016] 1 lock held by hugeadm/2899:\n[  173.676016]  #0:  (\u0026(\u0026inode-\u003ei_data.tree_lock)-\u003erlock){..-.-.}, at: [\u003cc10e3d2b\u003e] migrate_page_move_mapping+0x40/0x1ab\n[  173.676016]\n[  173.676016] stack backtrace:\n[  173.676016] Pid: 2899, comm: hugeadm Not tainted 2.6.37-rc5-autobuild\n[  173.676016] Call Trace:\n[  173.676016]  [\u003cc128cc01\u003e] ? printk+0x14/0x1b\n[  173.676016]  [\u003cc1063502\u003e] lockdep_rcu_dereference+0x7d/0x86\n[  173.676016]  [\u003cc10e3db5\u003e] migrate_page_move_mapping+0xca/0x1ab\n[  173.676016]  [\u003cc10e41ad\u003e] migrate_page+0x23/0x39\n[  173.676016]  [\u003cc10e491b\u003e] buffer_migrate_page+0x22/0x107\n[  173.676016]  [\u003cc10e48f9\u003e] ? buffer_migrate_page+0x0/0x107\n[  173.676016]  [\u003cc10e425d\u003e] move_to_new_page+0x9a/0x1ae\n[  173.676016]  [\u003cc10e47e6\u003e] migrate_pages+0x1e7/0x2fa\n\nThis patch introduces radix_tree_deref_slot_protected() which calls\nrcu_dereference_protected().  Users of it must pass in the\nmapping-\u003etree_lock that is protecting this dereference.  Holding the tree\nlock protects against parallel updaters of the radix tree meaning that\nrcu_dereference_protected is allowable.\n\n[akpm@linux-foundation.org: remove unneeded casts]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Milton Miller \u003cmiltonm@bga.com\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: \u003cstable@kernel.org\u003e\t\t[2.6.37.early]\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "22e5c47ee238abe636655c3862ed28d6eb084ad4",
      "tree": "4a4e7d330cbef6c99a8914de482eb0e8daba2485",
      "parents": [
        "29ad768cfc08611a4c1070d0f13f82eeea2bac7b"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:20 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "thp: add compound_trans_head() helper\n\nCleanup some code with common compound_trans_head helper.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCc: Marcelo Tosatti \u003cmtosatti@redhat.com\u003e\nCc: Avi Kivity \u003cavi@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": "29ad768cfc08611a4c1070d0f13f82eeea2bac7b",
      "tree": "a1cc7326d3a12bed79071559e2d4e8d43fb14814",
      "parents": [
        "60ab3244ec85c44276c585a2a20d3750402e1cf4"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:19 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:48 2011 -0800"
      },
      "message": "thp: KSM on THP\n\nThis makes KSM full operational with THP pages.  Subpages are scanned\nwhile the hugepage is still in place and delivering max cpu performance,\nand only if there\u0027s a match and we\u0027re going to deduplicate memory, the\nsingle hugepages with the subpage match is split.\n\nThere will be no false sharing between ksmd and khugepaged.  khugepaged\nwon\u0027t collapse 2m virtual regions with KSM pages inside.  ksmd also should\nonly split pages when the checksum matches and we\u0027re likely to split an\nhugepage for some long living ksm page (usual ksm heuristic to avoid\nsharing pages that get de-cowed).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "60ab3244ec85c44276c585a2a20d3750402e1cf4",
      "tree": "e69e866b370243fc58a6fc721e5347a265e8fd4f",
      "parents": [
        "a664b2d8555c659127bf8fe049a58449d394a707"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:18 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:47 2011 -0800"
      },
      "message": "thp: khugepaged: make khugepaged aware about madvise\n\nMADV_HUGEPAGE and MADV_NOHUGEPAGE were fully effective only if run after\nmmap and before touching the memory.  While this is enough for most\nusages, it\u0027s little effort to make madvise more dynamic at runtime on an\nexisting mapping by making khugepaged aware about madvise.\n\nMADV_HUGEPAGE: register in khugepaged immediately without waiting a page\nfault (that may not ever happen if all pages are already mapped and the\n\"enabled\" knob was set to madvise during the initial page faults).\n\nMADV_NOHUGEPAGE: skip vmas marked VM_NOHUGEPAGE in khugepaged to stop\ncollapsing pages where not needed.\n\n[akpm@linux-foundation.org: tweak comment]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@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": "a664b2d8555c659127bf8fe049a58449d394a707",
      "tree": "14771f4ab93a9dda98174f21e0361a77e2aebfa6",
      "parents": [
        "1ddd6db43a08cba56c7ee920800980862086f1c3"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:17 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:47 2011 -0800"
      },
      "message": "thp: madvise(MADV_NOHUGEPAGE)\n\nAdd madvise MADV_NOHUGEPAGE to mark regions that are not important to be\nhugepage backed.  Return -EINVAL if the vma is not of an anonymous type,\nor the feature isn\u0027t built into the kernel.  Never silently return\nsuccess.\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": "37c2ac7872a9387542616f658d20ac25f5bdb32e",
      "tree": "d115915db4a61e261012bf0f9c4cf14630243d71",
      "parents": [
        "91600e9e592e48736e630851c83da2ad6bf0e91f"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:16 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:47 2011 -0800"
      },
      "message": "thp: compound_trans_order\n\nRead compound_trans_order safe. Noop for CONFIG_TRANSPARENT_HUGEPAGE\u003dn.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\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": "91600e9e592e48736e630851c83da2ad6bf0e91f",
      "tree": "5b17c58699eed9c7440812f0f2f29f4c80972973",
      "parents": [
        "14d1a55cd26f1860f837f37ae42520c7c13b1347"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:16 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:47 2011 -0800"
      },
      "message": "thp: fix memory-failure hugetlbfs vs THP collision\n\nhugetlbfs was changed to allow memory failure to migrate the hugetlbfs\npages and that broke THP as split_huge_page was then called on hugetlbfs\npages too.\n\ncompound_head/order was also run unsafe on THP pages that can be splitted\nat any time.\n\nAll compound_head() invocations in memory-failure.c that are run on pages\nthat aren\u0027t pinned and that can be freed and reused from under us (while\ncompound_head is running) are buggy because compound_head can return a\ndangling pointer, but I\u0027m not fixing this as this is a generic\nmemory-failure bug not specific to THP but it applies to hugetlbfs too, so\nI can fix it later after THP is merged upstream.\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": "14d1a55cd26f1860f837f37ae42520c7c13b1347",
      "tree": "b80634a6a2a5f306fd1c3fc408993dd9fc98202b",
      "parents": [
        "05b258e99725112c4febeab4fad23ea2c8908a3a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:15 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:47 2011 -0800"
      },
      "message": "thp: add debug checks for mapcount related invariants\n\nAdd debug checks for invariants that if broken could lead to mapcount vs\npage_mapcount debug checks to trigger later in split_huge_page.\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": "9992af102974f3f8a02a1f2729c3461881539e26",
      "tree": "40958e1a8bd7efc7c9a4d28e2b77d86bb8688734",
      "parents": [
        "2c888cfbc1b45508a44763d85ba2e8ac43faff5f"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Thu Jan 13 15:47:13 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: scale nr_rotated to balance memory pressure\n\nMake sure we scale up nr_rotated when we encounter a referenced\ntransparent huge page.  This ensures pageout scanning balance is not\ndistorted when there are huge pages on the LRU.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.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": "2c888cfbc1b45508a44763d85ba2e8ac43faff5f",
      "tree": "9a7f2214e5d6a01d5724ae63d4d50cddeb2293ff",
      "parents": [
        "97562cd243298acf573620c764a1037bd545c9bc"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Thu Jan 13 15:47:13 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: fix anon memory statistics with transparent hugepages\n\nCount each transparent hugepage as HPAGE_PMD_NR pages in the LRU\nstatistics, so the Active(anon) and Inactive(anon) statistics in\n/proc/meminfo are correct.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.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": "97562cd243298acf573620c764a1037bd545c9bc",
      "tree": "79af6409724ae185e07bce4d9eaedef034bc83f8",
      "parents": [
        "c5a73c3d55be1faadba35b41a862e036a3b12ddb"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Thu Jan 13 15:47:12 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: disable transparent hugepages by default on small systems\n\nOn small systems, the extra memory used by the anti-fragmentation memory\nreserve and simply because huge pages are smaller than large pages can\neasily outweigh the benefits of less TLB misses.\n\nA less obvious concern is if run on a NUMA machine with asymmetric node\nsizes and one of them is very small.  The reserve could make the node\nunusable.\n\nIn case of the crashdump kernel, OOMs have been observed due to the\nanti-fragmentation memory reserve taking up a large fraction of the\ncrashdump image.\n\nThis patch disables transparent hugepages on systems with less than 1GB of\nRAM, but the hugepage subsystem is fully initialized so administrators can\nenable THP through /sys if desired.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Avi Kiviti \u003cavi@redhat.com\u003e\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": "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": "878aee7d6b5504e01b9caffce080e792b6b8d090",
      "tree": "c4a01a78885c25b6b3b1e0c74af7cb83c98a07c5",
      "parents": [
        "8ee53820edfd1f3b6554c593f337148dd3d7fc91"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:10 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: freeze khugepaged and ksmd\n\nIt\u0027s unclear why schedule friendly kernel threads can\u0027t be taken away by\nthe CPU through the scheduler itself.  It\u0027s safer to stop them as they can\ntrigger memory allocation, if kswapd also freezes itself to avoid\ngenerating I/O they have too.\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": "8ee53820edfd1f3b6554c593f337148dd3d7fc91",
      "tree": "ca69957e928cd3efa1b47f92dcfb00591702684c",
      "parents": [
        "4b7167b9ff9b7f3f528cbc4c7d02ebd275b9b10c"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:10 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: mmu_notifier_test_young\n\nFor GRU and EPT, we need gup-fast to set referenced bit too (this is why\nit\u0027s correct to return 0 when shadow_access_mask is zero, it requires\ngup-fast to set the referenced bit).  qemu-kvm access already sets the\nyoung bit in the pte if it isn\u0027t zero-copy, if it\u0027s zero copy or a shadow\npaging EPT minor fault we relay on gup-fast to signal the page is in\nuse...\n\nWe also need to check the young bits on the secondary pagetables for NPT\nand not nested shadow mmu as the data may never get accessed again by the\nprimary pte.\n\nWithout this closer accuracy, we\u0027d have to remove the heuristic that\navoids collapsing hugepages in hugepage virtual regions that have not even\na single subpage in use.\n\n-\u003etest_young is full backwards compatible with GRU and other usages that\ndon\u0027t have young bits in pagetables set by the hardware and that should\nnuke the secondary mmu mappings when -\u003eclear_flush_young runs just like\nEPT does.\n\nRemoving the heuristic that checks the young bit in\nkhugepaged/collapse_huge_page completely isn\u0027t so bad either probably but\nI thought it was worth it and this makes it reliable.\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": "4b7167b9ff9b7f3f528cbc4c7d02ebd275b9b10c",
      "tree": "ad2c23c28b9dea009daf3719aefeb79103e2c152",
      "parents": [
        "94fcc585fb85ad7b059c70872489b50044d401f3"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:09 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: don\u0027t allow transparent hugepage support without PSE\n\nArchs implementing Transparent Hugepage Support must implement a function\ncalled has_transparent_hugepage to be sure the virtual or physical CPU\nsupports Transparent Hugepages.\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": "94fcc585fb85ad7b059c70872489b50044d401f3",
      "tree": "67efce3803149bec77df1f50a06f384deae02ba6",
      "parents": [
        "bc835011afbea3957217ee716093d791fb2fe44f"
      ],
      "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: avoid breaking huge pmd invariants in case of vma_adjust failures\n\nAn huge pmd can only be mapped if the corresponding 2M virtual range is\nfully contained in the vma.  At times the VM calls split_vma twice, if the\nfirst split_vma succeeds and the second fail, the first split_vma remains\nin effect and it\u0027s not rolled back.  For split_vma or vma_adjust to fail\nan allocation failure is needed so it\u0027s a very unlikely event (the out of\nmemory killer would normally fire before any allocation failure is visible\nto kernel and userland and if an out of memory condition happens it\u0027s\nunlikely to happen exactly here).  Nevertheless it\u0027s safer to ensure that\nno huge pmd can be left around if the vma is adjusted in a way that can\u0027t\nfit hugepages anymore at the new vm_start/vm_end address.\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": "5d6892407cab23d4bf2f6de065ca351a53849323",
      "tree": "fd1a32bd669b787ed1a651cc68c9f4def1fbd41e",
      "parents": [
        "13ece886d99cd668483113f7238e419d5331af26"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:07 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled\n\nWith transparent hugepage support we need compaction for the \"defrag\"\nsysfs controls to be effective.\n\nAt the moment THP hangs the system if COMPACTION isn\u0027t selected, as\nwithout COMPACTION lumpy reclaim wouldn\u0027t be entirely disabled.  So at the\nmoment it\u0027s not orthogonal.  When lumpy will be removed from the VM I can\nremove the select COMPACTION in theory, but then 99% of THP users would be\nstill doing a mistake in disabling compaction, even if the mistake won\u0027t\nreturn in fatal runtime but just slightly degraded performance.  So from a\ntheoretical standpoing forcing the below select is not needed (the\ndependency isn\u0027t strict nor at compile time nor at runtime) but from a\npractical standpoint it is safer.\n\nIf anybody really wants THP to run without compaction, it\u0027d be such a\nweird setup that editing the Kconfig file to allow it will be surely not a\nproblem.\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": "13ece886d99cd668483113f7238e419d5331af26",
      "tree": "44a1c65870ba4463316f943f52d898bb3763ab81",
      "parents": [
        "ce83d2174ea9c3d72d5821cf3ebc974e36391bf7"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:07 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: transparent hugepage config choice\n\nAllow to choose between the always|madvise default for page faults and\nkhugepaged at config time.  madvise guarantees zero risk of higher memory\nfootprint for applications (applications using madvise(MADV_HUGEPAGE)\nwon\u0027t risk to use any more memory by backing their virtual regions with\nhugepages).\n\nInitially set the default to N and don\u0027t depend on EMBEDDED.\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": "ce83d2174ea9c3d72d5821cf3ebc974e36391bf7",
      "tree": "5e31167f84110551cf00ed3335b2cc3af317b33a",
      "parents": [
        "0bbbc0b33d141f78a0d9218a54a47f50621220d3"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:06 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: allocate memory in khugepaged outside of mmap_sem write mode\n\nThis tries to be more friendly to filesystem in userland, with userland\nbackends that allocate memory in the I/O paths and that could deadlock if\nkhugepaged holds the mmap_sem write mode of the userland backend while\nallocating memory.  Memory allocation may wait for writeback I/O\ncompletion from the daemon that may be blocked in the mmap_sem read mode\nif a page fault happens and the daemon wasn\u0027t using mlock for the memory\nrequired for the I/O submission and completion.\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": "0bbbc0b33d141f78a0d9218a54a47f50621220d3",
      "tree": "3ef3363c189ac536926119731eb86dcf989f4adb",
      "parents": [
        "d39d33c332c611094f84cee39715866f4cbf79e2"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:05 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: add numa awareness to hugepage allocations\n\nIt\u0027s mostly a matter of replacing alloc_pages with alloc_pages_vma after\nintroducing alloc_pages_vma.  khugepaged needs special handling as the\nallocation has to happen inside collapse_huge_page where the vma is known\nand an error has to be returned to the outer loop to sleep\nalloc_sleep_millisecs in case of failure.  But it retains the more\nefficient logic of handling allocation failures in khugepaged in case of\nCONFIG_NUMA\u003dn.\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": "d39d33c332c611094f84cee39715866f4cbf79e2",
      "tree": "d4b2a0d53867b9b679c098a08f831dca148acb19",
      "parents": [
        "f000565adb770b14cebbafde0a4f3e61a3342a63"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:05 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: enable direct defrag\n\nWith memory compaction in, and lumpy-reclaim disabled, it seems safe\nenough to defrag memory during the (synchronous) transparent hugepage page\nfaults (TRANSPARENT_HUGEPAGE_DEFRAG_FLAG) and not only during khugepaged\n(async) hugepage allocations that was already enabled even before memory\ncompaction was in (TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG).\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": "f000565adb770b14cebbafde0a4f3e61a3342a63",
      "tree": "ff2884da257e1df1b8cb4817d09c892d4f84727c",
      "parents": [
        "cd7548ab360c462118568eebb8c6da3bc303b02e"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:04 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: set recommended min free kbytes\n\nIf transparent hugepage is enabled initialize min_free_kbytes to an\noptimal value by default.  This moves the hugeadm algorithm in kernel.\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": "cd7548ab360c462118568eebb8c6da3bc303b02e",
      "tree": "44d145e6139c8753659ee773ae35810dc3d92d0b",
      "parents": [
        "b36f5b0710e9e3b92484de32920fddcb17278664"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:04 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: mprotect: transparent huge page support\n\nNatively handle huge pmds when changing page tables on behalf of\nmprotect().\n\nI left out update_mmu_cache() because we do not need it on x86 anyway but\nmore importantly the interface works on ptes, not pmds.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@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": "b36f5b0710e9e3b92484de32920fddcb17278664",
      "tree": "823f5ee3ff0e18c67489bd8e525d83f3f7cf1b1a",
      "parents": [
        "c489f1257b8cacd4881a18da1e93659f934a8e98"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:03 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: mprotect: pass vma down to page table walkers\n\nFlushing the tlb for huge pmds requires the vma\u0027s anon_vma, so pass along\nthe vma instead of the mm, we can always get the latter when we need it.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@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": "0ca1634d4143c3579273ca53b993df19f5c98e92",
      "tree": "d566a582357a9e1528d1783566bfda4375c7e566",
      "parents": [
        "f2d6bfe9ff0acec30b713614260e78b03d20e909"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:02 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: mincore transparent hugepage support\n\nHandle transparent huge page pmd entries natively instead of splitting\nthem into subpages.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@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": "f2d6bfe9ff0acec30b713614260e78b03d20e909",
      "tree": "835dd9f4167513d94ae542cf92347ea98bff5ddc",
      "parents": [
        "5f24ce5fd34c3ca1b3d10d30da754732da64d5c0"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:01 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: add x86 32bit support\n\nAdd support for transparent hugepages to x86 32bit.\n\nShare the same VM_ bitflag for VM_MAPPED_COPY.  mm/nommu.c will never\nsupport transparent hugepages.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@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": "5f24ce5fd34c3ca1b3d10d30da754732da64d5c0",
      "tree": "c82d27461f2adda210e77808b7dd04eaec017f2f",
      "parents": [
        "21ae5b01750f14140809508a478a4413792e0261"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:00 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: remove PG_buddy\n\nPG_buddy can be converted to _mapcount \u003d\u003d -2.  So the PG_compound_lock can\nbe added to page-\u003eflags without overflowing (because of the sparse section\nbits increasing) with CONFIG_X86_PAE\u003dy and CONFIG_X86_PAT\u003dy.  This also\nhas to move the memory hotplug code from _mapcount to lru.next to avoid\nany risk of clashes.  We can\u0027t use lru.next for PG_buddy removal, but\nmemory hotplug can use lru.next even more easily than the mapcount\ninstead.\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": "21ae5b01750f14140809508a478a4413792e0261",
      "tree": "49fff503cf2e17e0f8e583e83e43b337f9728c23",
      "parents": [
        "b15d00b6af617251cc70a908df983e9aff57e169"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:00 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: skip transhuge pages in ksm for now\n\nSkip transhuge pages in ksm for now.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@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": "b15d00b6af617251cc70a908df983e9aff57e169",
      "tree": "0fd28ef8d3705505d5b84d495875e3837698b540",
      "parents": [
        "ba76149f47d8c939efa0acc07a191237af900471"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:59 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: khugepaged vma merge\n\nregister in khugepaged if the vma grows.\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": "ba76149f47d8c939efa0acc07a191237af900471",
      "tree": "162990f51dd24984f114cba14fc7169a3b54f0f1",
      "parents": [
        "79134171df238171daa4c024a42b77b401ccb00b"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:58 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: khugepaged\n\nAdd khugepaged to relocate fragmented pages into hugepages if new\nhugepages become available.  (this is indipendent of the defrag logic that\nwill have to make new hugepages available)\n\nThe fundamental reason why khugepaged is unavoidable, is that some memory\ncan be fragmented and not everything can be relocated.  So when a virtual\nmachine quits and releases gigabytes of hugepages, we want to use those\nfreely available hugepages to create huge-pmd in the other virtual\nmachines that may be running on fragmented memory, to maximize the CPU\nefficiency at all times.  The scan is slow, it takes nearly zero cpu time,\nexcept when it copies data (in which case it means we definitely want to\npay for that cpu time) so it seems a good tradeoff.\n\nIn addition to the hugepages being released by other process releasing\nmemory, we have the strong suspicion that the performance impact of\npotentially defragmenting hugepages during or before each page fault could\nlead to more performance inconsistency than allocating small pages at\nfirst and having them collapsed into large pages later...  if they prove\nthemselfs to be long lived mappings (khugepaged scan is slow so short\nlived mappings have low probability to run into khugepaged if compared to\nlong lived mappings).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "79134171df238171daa4c024a42b77b401ccb00b",
      "tree": "af7872d5851e371d09b9fe7eb80f4809713c79fb",
      "parents": [
        "b9bbfbe30ae088cc88a4b2ba7732baeebd1a0162"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:58 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: transparent hugepage vmstat\n\nAdd hugepage stat information to /proc/vmstat and /proc/meminfo.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "b9bbfbe30ae088cc88a4b2ba7732baeebd1a0162",
      "tree": "5f3d69ad2de2bdb8782180c7ce33bf1b9b190774",
      "parents": [
        "152c9ccb75548c027fa3103efa4fa4e19a345449"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:57 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: memcg huge memory\n\nAdd memcg charge/uncharge to hugepage faults in huge_memory.c.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "152c9ccb75548c027fa3103efa4fa4e19a345449",
      "tree": "d22e8f71b3e0689fc0e3ae21609ae1abe5bc4d2f",
      "parents": [
        "ec1685109f1314a30919489ef2800ed626a38c1e"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 13 15:46:56 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: transhuge-memcg: commit tail pages at charge\n\nBy this patch, when a transparent hugepage is charged, not only the head\npage but also all the tail pages are committed, IOW pc-\u003emem_cgroup and\npc-\u003eflags of tail pages are set.\n\nWithout this patch:\n\n- Tail pages are not linked to any memcg\u0027s LRU at splitting. This causes many\n  problems, for example, the charged memcg\u0027s directory can never be rmdir\u0027ed\n  because it doesn\u0027t have enough pages to scan to make the usage decrease to 0.\n- \"rss\" field in memory.stat would be incorrect. Moreover, usage_in_bytes in\n  root cgroup is calculated by the stat not by res_counter(since 2.6.32),\n  it would be incorrect too.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\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": "ec1685109f1314a30919489ef2800ed626a38c1e",
      "tree": "48ac32238182623af24b6c25be456c0ca432047b",
      "parents": [
        "500d65d471018d9a13b0d51b7e141ed2a3555c1d"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:56 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: memcg compound\n\nTeach memcg to charge/uncharge compound pages.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "500d65d471018d9a13b0d51b7e141ed2a3555c1d",
      "tree": "046dc2337f87a1a365fde126fab7f4ac9ae82793",
      "parents": [
        "0af4e98b6b095c74588af04872f83d333c958c32"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:55 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: pmd_trans_huge migrate bugcheck\n\nNo pmd_trans_huge should ever materialize in migration ptes areas, because\nwe split the hugepage before migration ptes are instantiated.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "0af4e98b6b095c74588af04872f83d333c958c32",
      "tree": "56b1965482470219a8cf11b7e7c875ae91bff46e",
      "parents": [
        "f66055ab6fb9731dbfce320c5202ef4441b5d77f"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:55 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: madvise(MADV_HUGEPAGE)\n\nAdd madvise MADV_HUGEPAGE to mark regions that are important to be\nhugepage backed.  Return -EINVAL if the vma is not of an anonymous type,\nor the feature isn\u0027t built into the kernel.  Never silently return\nsuccess.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "f66055ab6fb9731dbfce320c5202ef4441b5d77f",
      "tree": "de347e42d1e5cf481344a153d272e86a95b774f4",
      "parents": [
        "05759d380a9d7f131a475186c07fce58ceaa8902"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:54 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: verify pmd_trans_huge isn\u0027t leaking\n\npte_trans_huge must not leak in certain vmas like the mmio special pfn or\nfilebacked mappings.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "05759d380a9d7f131a475186c07fce58ceaa8902",
      "tree": "6c253f15176c89f6f8dfd80b1471bcf3e0a3e44e",
      "parents": [
        "8a07651ee8cdaa9e27cb4ae372aed347533770f5"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:53 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: split_huge_page anon_vma ordering dependency\n\nThis documents how split_huge_page is safe vs new vma inserctions into the\nanon_vma that may have already released the anon_vma-\u003elock but not\nestablished pmds yet when split_huge_page starts.\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": "8a07651ee8cdaa9e27cb4ae372aed347533770f5",
      "tree": "07a442e66c3f608e174edd3b8a2fd154f4219380",
      "parents": [
        "71e3aac0724ffe8918992d76acfe3aad7d8724a5"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:46:52 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: transparent hugepage core fixlet\n\nIf you configure THP in addition to HUGETLB_PAGE on x86_32 without PAE,\nthe p?d-folding works out that munlock_vma_pages_range() can crash to\nfollow_page()\u0027s pud_huge() BUG_ON(flags \u0026 FOLL_GET): it needs the same\nVM_HUGETLB check already there on the pmd_huge() line.  Conveniently,\nopenSUSE provides a \"blogd\" which tests this out at startup!\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\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": "71e3aac0724ffe8918992d76acfe3aad7d8724a5",
      "tree": "4ff96e1fc3e53bc9d25b859bf7e5bdbab8f1b25a",
      "parents": [
        "5c3240d92e29ae7bfb9cb58a9b37e80ab40894ff"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:52 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: transparent hugepage core\n\nLately I\u0027ve been working to make KVM use hugepages transparently without\nthe usual restrictions of hugetlbfs.  Some of the restrictions I\u0027d like to\nsee removed:\n\n1) hugepages have to be swappable or the guest physical memory remains\n   locked in RAM and can\u0027t be paged out to swap\n\n2) if a hugepage allocation fails, regular pages should be allocated\n   instead and mixed in the same vma without any failure and without\n   userland noticing\n\n3) if some task quits and more hugepages become available in the\n   buddy, guest physical memory backed by regular pages should be\n   relocated on hugepages automatically in regions under\n   madvise(MADV_HUGEPAGE) (ideally event driven by waking up the\n   kernel deamon if the order\u003dHPAGE_PMD_SHIFT-PAGE_SHIFT list becomes\n   not null)\n\n4) avoidance of reservation and maximization of use of hugepages whenever\n   possible. Reservation (needed to avoid runtime fatal faliures) may be ok for\n   1 machine with 1 database with 1 database cache with 1 database cache size\n   known at boot time. It\u0027s definitely not feasible with a virtualization\n   hypervisor usage like RHEV-H that runs an unknown number of virtual machines\n   with an unknown size of each virtual machine with an unknown amount of\n   pagecache that could be potentially useful in the host for guest not using\n   O_DIRECT (aka cache\u003doff).\n\nhugepages in the virtualization hypervisor (and also in the guest!) are\nmuch more important than in a regular host not using virtualization,\nbecasue with NPT/EPT they decrease the tlb-miss cacheline accesses from 24\nto 19 in case only the hypervisor uses transparent hugepages, and they\ndecrease the tlb-miss cacheline accesses from 19 to 15 in case both the\nlinux hypervisor and the linux guest both uses this patch (though the\nguest will limit the addition speedup to anonymous regions only for\nnow...).  Even more important is that the tlb miss handler is much slower\non a NPT/EPT guest than for a regular shadow paging or no-virtualization\nscenario.  So maximizing the amount of virtual memory cached by the TLB\npays off significantly more with NPT/EPT than without (even if there would\nbe no significant speedup in the tlb-miss runtime).\n\nThe first (and more tedious) part of this work requires allowing the VM to\nhandle anonymous hugepages mixed with regular pages transparently on\nregular anonymous vmas.  This is what this patch tries to achieve in the\nleast intrusive possible way.  We want hugepages and hugetlb to be used in\na way so that all applications can benefit without changes (as usual we\nleverage the KVM virtualization design: by improving the Linux VM at\nlarge, KVM gets the performance boost too).\n\nThe most important design choice is: always fallback to 4k allocation if\nthe hugepage allocation fails!  This is the _very_ opposite of some large\npagecache patches that failed with -EIO back then if a 64k (or similar)\nallocation failed...\n\nSecond important decision (to reduce the impact of the feature on the\nexisting pagetable handling code) is that at any time we can split an\nhugepage into 512 regular pages and it has to be done with an operation\nthat can\u0027t fail.  This way the reliability of the swapping isn\u0027t decreased\n(no need to allocate memory when we are short on memory to swap) and it\u0027s\ntrivial to plug a split_huge_page* one-liner where needed without\npolluting the VM.  Over time we can teach mprotect, mremap and friends to\nhandle pmd_trans_huge natively without calling split_huge_page*.  The fact\nit can\u0027t fail isn\u0027t just for swap: if split_huge_page would return -ENOMEM\n(instead of the current void) we\u0027d need to rollback the mprotect from the\nmiddle of it (ideally including undoing the split_vma) which would be a\nbig change and in the very wrong direction (it\u0027d likely be simpler not to\ncall split_huge_page at all and to teach mprotect and friends to handle\nhugepages instead of rolling them back from the middle).  In short the\nvery value of split_huge_page is that it can\u0027t fail.\n\nThe collapsing and madvise(MADV_HUGEPAGE) part will remain separated and\nincremental and it\u0027ll just be an \"harmless\" addition later if this initial\npart is agreed upon.  It also should be noted that locking-wise replacing\nregular pages with hugepages is going to be very easy if compared to what\nI\u0027m doing below in split_huge_page, as it will only happen when\npage_count(page) matches page_mapcount(page) if we can take the PG_lock\nand mmap_sem in write mode.  collapse_huge_page will be a \"best effort\"\nthat (unlike split_huge_page) can fail at the minimal sign of trouble and\nwe can try again later.  collapse_huge_page will be similar to how KSM\nworks and the madvise(MADV_HUGEPAGE) will work similar to\nmadvise(MADV_MERGEABLE).\n\nThe default I like is that transparent hugepages are used at page fault\ntime.  This can be changed with\n/sys/kernel/mm/transparent_hugepage/enabled.  The control knob can be set\nto three values \"always\", \"madvise\", \"never\" which mean respectively that\nhugepages are always used, or only inside madvise(MADV_HUGEPAGE) regions,\nor never used.  /sys/kernel/mm/transparent_hugepage/defrag instead\ncontrols if the hugepage allocation should defrag memory aggressively\n\"always\", only inside \"madvise\" regions, or \"never\".\n\nThe pmd_trans_splitting/pmd_trans_huge locking is very solid.  The\nput_page (from get_user_page users that can\u0027t use mmu notifier like\nO_DIRECT) that runs against a __split_huge_page_refcount instead was a\npain to serialize in a way that would result always in a coherent page\ncount for both tail and head.  I think my locking solution with a\ncompound_lock taken only after the page_first is valid and is still a\nPageHead should be safe but it surely needs review from SMP race point of\nview.  In short there is no current existing way to serialize the O_DIRECT\nfinal put_page against split_huge_page_refcount so I had to invent a new\none (O_DIRECT loses knowledge on the mapping status by the time gup_fast\nreturns so...).  And I didn\u0027t want to impact all gup/gup_fast users for\nnow, maybe if we change the gup interface substantially we can avoid this\nlocking, I admit I didn\u0027t think too much about it because changing the gup\nunpinning interface would be invasive.\n\nIf we ignored O_DIRECT we could stick to the existing compound refcounting\ncode, by simply adding a get_user_pages_fast_flags(foll_flags) where KVM\n(and any other mmu notifier user) would call it without FOLL_GET (and if\nFOLL_GET isn\u0027t set we\u0027d just BUG_ON if nobody registered itself in the\ncurrent task mmu notifier list yet).  But O_DIRECT is fundamental for\ndecent performance of virtualized I/O on fast storage so we can\u0027t avoid it\nto solve the race of put_page against split_huge_page_refcount to achieve\na complete hugepage feature for KVM.\n\nSwap and oom works fine (well just like with regular pages ;).  MMU\nnotifier is handled transparently too, with the exception of the young bit\non the pmd, that didn\u0027t have a range check but I think KVM will be fine\nbecause the whole point of hugepages is that EPT/NPT will also use a huge\npmd when they notice gup returns pages with PageCompound set, so they\nwon\u0027t care of a range and there\u0027s just the pmd young bit to check in that\ncase.\n\nNOTE: in some cases if the L2 cache is small, this may slowdown and waste\nmemory during COWs because 4M of memory are accessed in a single fault\ninstead of 8k (the payoff is that after COW the program can run faster).\nSo we might want to switch the copy_huge_page (and clear_huge_page too) to\nnot temporal stores.  I also extensively researched ways to avoid this\ncache trashing with a full prefault logic that would cow in 8k/16k/32k/64k\nup to 1M (I can send those patches that fully implemented prefault) but I\nconcluded they\u0027re not worth it and they add an huge additional complexity\nand they remove all tlb benefits until the full hugepage has been faulted\nin, to save a little bit of memory and some cache during app startup, but\nthey still don\u0027t improve substantially the cache-trashing during startup\nif the prefault happens in \u003e4k chunks.  One reason is that those 4k pte\nentries copied are still mapped on a perfectly cache-colored hugepage, so\nthe trashing is the worst one can generate in those copies (cow of 4k page\ncopies aren\u0027t so well colored so they trashes less, but again this results\nin software running faster after the page fault).  Those prefault patches\nallowed things like a pte where post-cow pages were local 4k regular anon\npages and the not-yet-cowed pte entries were pointing in the middle of\nsome hugepage mapped read-only.  If it doesn\u0027t payoff substantially with\ntodays hardware it will payoff even less in the future with larger l2\ncaches, and the prefault logic would blot the VM a lot.  If one is\nemebdded transparent_hugepage can be disabled during boot with sysfs or\nwith the boot commandline parameter transparent_hugepage\u003d0 (or\ntransparent_hugepage\u003d2 to restrict hugepages inside madvise regions) that\nwill ensure not a single hugepage is allocated at boot time.  It is simple\nenough to just disable transparent hugepage globally and let transparent\nhugepages be allocated selectively by applications in the MADV_HUGEPAGE\nregion (both at page fault time, and if enabled with the\ncollapse_huge_page too through the kernel daemon).\n\nThis patch supports only hugepages mapped in the pmd, archs that have\nsmaller hugepages will not fit in this patch alone.  Also some archs like\npower have certain tlb limits that prevents mixing different page size in\nthe same regions so they will not fit in this framework that requires\n\"graceful fallback\" to basic PAGE_SIZE in case of physical memory\nfragmentation.  hugetlbfs remains a perfect fit for those because its\nsoftware limits happen to match the hardware limits.  hugetlbfs also\nremains a perfect fit for hugepage sizes like 1GByte that cannot be hoped\nto be found not fragmented after a certain system uptime and that would be\nvery expensive to defragment with relocation, so requiring reservation.\nhugetlbfs is the \"reservation way\", the point of transparent hugepages is\nnot to have any reservation at all and maximizing the use of cache and\nhugepages at all times automatically.\n\nSome performance result:\n\nvmx andrea # LD_PRELOAD\u003d/usr/lib64/libhugetlbfs.so HUGETLB_MORECORE\u003dyes HUGETLB_PATH\u003d/mnt/huge/ ./largep\nages3\nmemset page fault 1566023\nmemset tlb miss 453854\nmemset second tlb miss 453321\nrandom access tlb miss 41635\nrandom access second tlb miss 41658\nvmx andrea # LD_PRELOAD\u003d/usr/lib64/libhugetlbfs.so HUGETLB_MORECORE\u003dyes HUGETLB_PATH\u003d/mnt/huge/ ./largepages3\nmemset page fault 1566471\nmemset tlb miss 453375\nmemset second tlb miss 453320\nrandom access tlb miss 41636\nrandom access second tlb miss 41637\nvmx andrea # ./largepages3\nmemset page fault 1566642\nmemset tlb miss 453417\nmemset second tlb miss 453313\nrandom access tlb miss 41630\nrandom access second tlb miss 41647\nvmx andrea # ./largepages3\nmemset page fault 1566872\nmemset tlb miss 453418\nmemset second tlb miss 453315\nrandom access tlb miss 41618\nrandom access second tlb miss 41659\nvmx andrea # echo 0 \u003e /proc/sys/vm/transparent_hugepage\nvmx andrea # ./largepages3\nmemset page fault 2182476\nmemset tlb miss 460305\nmemset second tlb miss 460179\nrandom access tlb miss 44483\nrandom access second tlb miss 44186\nvmx andrea # ./largepages3\nmemset page fault 2182791\nmemset tlb miss 460742\nmemset second tlb miss 459962\nrandom access tlb miss 43981\nrandom access second tlb miss 43988\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cstring.h\u003e\n#include \u003csys/time.h\u003e\n\n#define SIZE (3UL*1024*1024*1024)\n\nint main()\n{\n\tchar *p \u003d malloc(SIZE), *p2;\n\tstruct timeval before, after;\n\n\tgettimeofday(\u0026before, NULL);\n\tmemset(p, 0, SIZE);\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"memset page fault %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tmemset(p, 0, SIZE);\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"memset tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tmemset(p, 0, SIZE);\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"memset second tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tfor (p2 \u003d p; p2 \u003c p+SIZE; p2 +\u003d 4096)\n\t\t*p2 \u003d 0;\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"random access tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tfor (p2 \u003d p; p2 \u003c p+SIZE; p2 +\u003d 4096)\n\t\t*p2 \u003d 0;\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"random access second tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\treturn 0;\n}\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-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": "5c3240d92e29ae7bfb9cb58a9b37e80ab40894ff",
      "tree": "fffa9f90492b61ef1578e1c41118024c81d77863",
      "parents": [
        "32dba98e085f8b2b4345887df9abf5e0e93bfc12"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:49 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: don\u0027t alloc harder for gfp nomemalloc even if nowait\n\nNot worth throwing away the precious reserved free memory pool for\nallocations that can fail gracefully (either through mempool or because\nthey\u0027re transhuge allocations later falling back to 4k allocations).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.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": "32dba98e085f8b2b4345887df9abf5e0e93bfc12",
      "tree": "6789196797350911a1c370ce909bfde2556ccfc4",
      "parents": [
        "936a5fe6e6148c0b3ea0d792b903847d9b9931a1"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:49 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: _GFP_NO_KSWAPD\n\nTransparent hugepage allocations must be allowed not to invoke kswapd or\nany other kind of indirect reclaim (especially when the defrag sysfs is\ncontrol disabled).  It\u0027s unacceptable to swap out anonymous pages\n(potentially anonymous transparent hugepages) in order to create new\ntransparent hugepages.  This is true for the MADV_HUGEPAGE areas too\n(swapping out a kvm virtual machine and so having it suffer an unbearable\nslowdown, so another one with guest physical memory marked MADV_HUGEPAGE\ncan run 30% faster if it is running memory intensive workloads, makes no\nsense).  If a transparent hugepage allocation fails the slowdown is minor\nand there is total fallback, so kswapd should never be asked to swapout\nmemory to allow the high order allocation to succeed.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "47ad8475c000141eacb3ecda5e5ce4b43a9cd04d",
      "tree": "78c29aaf2ae9340e314a25ea08e9724471cf4414",
      "parents": [
        "3f04f62f90d46a82dd73027c5fd7a15daed5c33d"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: clear_copy_huge_page\n\nMove the copy/clear_huge_page functions to common code to share between\nhugetlb.c and huge_memory.c.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "3f04f62f90d46a82dd73027c5fd7a15daed5c33d",
      "tree": "c267f1bdde3f3a7b2a8b52347fa5ad6053cff435",
      "parents": [
        "bae9c19bf12bb2a914a8e530270f41d36cc87c63"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: split_huge_page paging\n\nPaging logic that splits the page before it is unmapped and added to swap\nto ensure backwards compatibility with the legacy swap code.  Eventually\nswap should natively pageout the hugepages to increase performance and\ndecrease seeking and fragmentation of swap space.  swapoff can just skip\nover huge pmd as they cannot be part of swap yet.  In add_to_swap be\ncareful to split the page only if we got a valid swap entry so we don\u0027t\nsplit hugepages with a full swap.\n\nIn theory we could split pages before isolating them during the lru scan,\nbut for khugepaged to be safe, I\u0027m relying on either mmap_sem write mode,\nor PG_lock taken, so split_huge_page has to run either with mmap_sem\nread/write mode or PG_lock taken.  Calling it from isolate_lru_page would\nmake locking more complicated, in addition to that split_huge_page would\ndeadlock if called by __isolate_lru_page because it has to take the lru\nlock to add the tail pages.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@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": "bae9c19bf12bb2a914a8e530270f41d36cc87c63",
      "tree": "19807de9c2cb9b47fa842a549bd8c2c21579e323",
      "parents": [
        "e7a00c45f29c0155007aa150bf231a70fa470365"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:46 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: split_huge_page_mm/vma\n\nsplit_huge_page_pmd compat code.  Each one of those would need to be\nexpanded to hundred of lines of complex code without a fully reliable\nsplit_huge_page_pmd design.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-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": "8ac1f8320a0073f28cf9e0491af4cd98f504f92a",
      "tree": "4dad891c302587fdc7b099b18e05d7dbc5526c64",
      "parents": [
        "64cc6ae001d70bc59e5f854e6b5678f59110df16"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:43 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: pte alloc trans splitting\n\npte alloc routines must wait for split_huge_page if the pmd is not present\nand not null (i.e.  pmd_trans_splitting).  The additional branches are\noptimized away at compile time by pmd_trans_splitting if the config option\nis off.  However we must pass the vma down in order to know the anon_vma\nlock to wait for.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "e2cda322648122dc400c85ada80eaddbc612ef6a",
      "tree": "016981ea6d9d3f7448bd9e04720184b14a79302c",
      "parents": [
        "5f6e8da70a289d403975907371ce5738c726ad3f"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:40 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: add pmd mangling generic functions\n\nSome are needed to build but not actually used on archs not supporting\ntransparent hugepages.  Others like pmdp_clear_flush are used by x86 too.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "4c76d9d1fb9b21fa10c9e4c1fab2875018a88aa1",
      "tree": "a7186c416e3fc0451702b42051e4b91dc3893f3f",
      "parents": [
        "59ff421631295cd54dbf75dcc53d27e84af6d9c0"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:39 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: CONFIG_TRANSPARENT_HUGEPAGE\n\nAdd config option.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "59ff421631295cd54dbf75dcc53d27e84af6d9c0",
      "tree": "2570c413cd0e5938ed5e9c09d00fe026bfa63ca4",
      "parents": [
        "14fd403f2146f740942d78af4e0ee59396ad8eab"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:38 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: comment reminder in destroy_compound_page\n\nWarn destroy_compound_page that __split_huge_page_refcount is heavily\ndependent on its internal behavior.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "14fd403f2146f740942d78af4e0ee59396ad8eab",
      "tree": "c87734f6c6639684208d36548aa3687c6f460e23",
      "parents": [
        "2609ae6d10af0531e826335bd1445d1ace17c847"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:37 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: export maybe_mkwrite\n\nhuge_memory.c needs it too when it fallbacks in copying hugepages into\nregular fragmented pages if hugepage allocation fails during COW.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "8dd60a3a65c1b057bf0031d28436d3447a3c545b",
      "tree": "19040d799dbf846191c8855450c662014ecec722",
      "parents": [
        "a5b338f2b0b1ff73ae20c66ab831201549eaec01"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:34 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: clear compound mapping\n\nClear compound mapping for anonymous compound pages like it already\nhappens for regular anonymous pages.  But crash if mapping is set for any\ntail page, also the PageAnon check is meaningless for tail pages.  This\ncheck only makes sense for the head page, for tail page it can only hide\nbugs and we definitely don\u0027t want to hide bugs.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "a95a82e96c48270980dd248ccd5546f1b49e6f8a",
      "tree": "35f10c2a8d2cd0e1aa9d33f7a4f55332c0733ee6",
      "parents": [
        "9180706344487700b40da9eca5dedd3d11cb33b4"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:33 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: put_page: recheck PageHead after releasing the compound_lock\n\nAfter releasing the compound_lock split_huge_page can still run and release the\npage before put_page_testzero runs.\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": "9180706344487700b40da9eca5dedd3d11cb33b4",
      "tree": "eb0347efe7e40adc78a271752c7382aa67875d6a",
      "parents": [
        "e9da73d67729b58bba256123e2b4651e0d8a01ac"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:32 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: alter compound get_page/put_page\n\nAlter compound get_page/put_page to keep references on subpages too, in\norder to allow __split_huge_page_refcount to split an hugepage even while\nsubpages have been pinned by one of the get_user_pages() variants.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@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": "4e9f64c42d0ba5eb0c78569435ada4c224332ce4",
      "tree": "71df9e94a7f400755bd9ae02ed0c183e429f91cf",
      "parents": [
        "ae52a2adb5afa5ac5ec5fb5c7b24777f84b6c926"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:29 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: fix bad_page to show the real reason the page is bad\n\npage_count shows the count of the head page, but the actual check is done\non the tail page, so show what is really being checked.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@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": "ae52a2adb5afa5ac5ec5fb5c7b24777f84b6c926",
      "tree": "fb02d8fb1699c85cc278e2333ce25916835bf341",
      "parents": [
        "240c879f20a605346705be24253bc9fc6fa8a106"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:46:28 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: ksm: free swap when swapcache page is replaced\n\nWhen a swapcache page is replaced by a ksm page, it\u0027s best to free that\nswap immediately.\n\nReported-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Hugh Dickins \u003chughd@google.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": "240c879f20a605346705be24253bc9fc6fa8a106",
      "tree": "85c38509483aa5f69d3dea5daa21412dd2e6aced",
      "parents": [
        "ecb256f815232b35ae8382cff36ca8ce0bbd077e"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Thu Jan 13 15:46:27 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "writeback: avoid unnecessary determine_dirtyable_memory call\n\nI think determine_dirtyable_memory() is a rather costly function since it\nneed many atomic reads for gathering zone/global page state.  But when we\nuse vm_dirty_bytes \u0026\u0026 dirty_background_bytes, we don\u0027t need that costly\ncalculation.\n\nThis patch eliminates such unnecessary overhead.\n\nNOTE : newly added if condition might add overhead in normal path.\n       But it should be _really_ small because anyway we need the\n       access both vm_dirty_bytes and dirty_background_bytes so it is\n       likely to hit the cache.\n\n[akpm@linux-foundation.org: fix used-uninitialised warning]\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ecb256f815232b35ae8382cff36ca8ce0bbd077e",
      "tree": "4f488ba29b5bf860576a3a2e405607a9c32048bf",
      "parents": [
        "dc83edd941f412e938841b4989be24aa288a1aa6"
      ],
      "author": {
        "name": "Volodymyr G. Lukiianyk",
        "email": "volodymyrgl@gmail.com",
        "time": "Thu Jan 13 15:46:26 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: set correct numa_zonelist_order string when configured on the kernel command line\n\nWhen numa_zonelist_order parameter is set to \"node\" or \"zone\" on the\ncommand line it\u0027s still showing as \"default\" in sysctl.  That\u0027s because\nearly_param parsing function changes only user_zonelist_order variable.\nFix this by copying user-provided string to numa_zonelist_order if it was\nsuccessfully parsed.\n\nSigned-off-by: Volodymyr G Lukiianyk \u003cvolodymyrgl@gmail.com\u003e\nAcked-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": "dc83edd941f412e938841b4989be24aa288a1aa6",
      "tree": "07dbc04d544f3200b3b13be1af6c57f44ffa63c8",
      "parents": [
        "355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:26 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: use the classzone idx that kswapd was using for sleeping_prematurely()\n\nWhen kswapd is woken up for a high-order allocation, it takes account of\nthe highest usable zone by the caller (the classzone idx).  During\nallocation, this index is used to select the lowmem_reserve[] that should\nbe applied to the watermark calculation in zone_watermark_ok().\n\nWhen balancing a node, kswapd considers the highest unbalanced zone to be\nthe classzone index.  This will always be at least be the callers\nclasszone_idx and can be higher.  However, sleeping_prematurely() always\nconsiders the lowest zone (e.g.  ZONE_DMA) to be the classzone index.\nThis means that sleeping_prematurely() can consider a zone to be balanced\nthat is unusable by the allocation request that originally woke kswapd.\nThis patch changes sleeping_prematurely() to use a classzone_idx matching\nthe value it used in balance_pgdat().\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@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": "355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b",
      "tree": "26be6f89cac5b6f5b321cf74103444ae8775c3eb",
      "parents": [
        "4d40502ea580c35414a1466d86f96484910ebaec"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:24 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: treat zone-\u003eall_unreclaimable in sleeping_prematurely similar to balance_pgdat()\n\nAfter DEF_PRIORITY, balance_pgdat() considers all_unreclaimable zones to\nbe balanced but sleeping_prematurely does not.  This can force kswapd to\nstay awake longer than it should.  This patch fixes it.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@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": "4d40502ea580c35414a1466d86f96484910ebaec",
      "tree": "ed03d2b5a100be1c3371d304421af221fa893129",
      "parents": [
        "0abdee2bd4118366c62349a304f81537be69af33"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:23 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: reset kswapd_max_order and classzone_idx after reading\n\nWhen kswapd wakes up, it reads its order and classzone from pgdat and\ncalls balance_pgdat.  While its awake, it potentially reclaimes at a high\norder and a low classzone index.  This might have been a once-off that was\nnot required by subsequent callers.  However, because the pgdat values\nwere not reset, they remain artifically high while balance_pgdat() is\nrunning and potentially kswapd enters a second unnecessary reclaim cycle.\nReset the pgdat order and classzone index after reading.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@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": "0abdee2bd4118366c62349a304f81537be69af33",
      "tree": "c013abd2dd49b3837d033eb4d32dfb57984d273e",
      "parents": [
        "1741c87757448cedd03224f01586504f9256415d"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:22 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: use the order that kswapd was reclaiming at for sleeping_prematurely()\n\nBefore kswapd goes to sleep, it uses sleeping_prematurely() to check if\nthere was a race pushing a zone below its watermark.  If the race\nhappened, it stays awake.  However, balance_pgdat() can decide to reclaim\nat order-0 if it decides that high-order reclaim is not working as\nexpected.  This information is not passed back to sleeping_prematurely().\nThe impact is that kswapd remains awake reclaiming pages long after it\nshould have gone to sleep.  This patch passes the adjusted order to\nsleeping_prematurely and uses the same logic as balance_pgdat to decide if\nit\u0027s ok to go to sleep.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@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": "1741c87757448cedd03224f01586504f9256415d",
      "tree": "e8f3bace5f0cd1652a3a2a682189b19f7b3af875",
      "parents": [
        "9950474883e027e6e728cbcff25f7f2bf0c96530"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:21 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: keep kswapd awake for high-order allocations until a percentage of the node is balanced\n\nWhen reclaiming for high-orders, kswapd is responsible for balancing a\nnode but it should not reclaim excessively.  It avoids excessive reclaim\nby considering if any zone in a node is balanced then the node is\nbalanced.  In the cases where there are imbalanced zone sizes (e.g.\nZONE_DMA with both ZONE_DMA32 and ZONE_NORMAL), kswapd can go to sleep\nprematurely as just one small zone was balanced.\n\nThis alters the sleep logic of kswapd slightly.  It counts the number of\npages that make up the balanced zones.  If the total number of balanced\npages is more than a quarter of the zone, kswapd will go back to sleep.\nThis should keep a node balanced without reclaiming an excessive number of\npages.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@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": "9950474883e027e6e728cbcff25f7f2bf0c96530",
      "tree": "ecfdd3e68a25f1ef7822428c44f8375efbe9bc0c",
      "parents": [
        "c585a2678d83ba8fb02fa6b197de0ac7d67377f1"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:20 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: stop high-order balancing when any suitable zone is balanced\n\nSimon Kirby reported the following problem\n\n   We\u0027re seeing cases on a number of servers where cache never fully\n   grows to use all available memory.  Sometimes we see servers with 4 GB\n   of memory that never seem to have less than 1.5 GB free, even with a\n   constantly-active VM.  In some cases, these servers also swap out while\n   this happens, even though they are constantly reading the working set\n   into memory.  We have been seeing this happening for a long time; I\n   don\u0027t think it\u0027s anything recent, and it still happens on 2.6.36.\n\nAfter some debugging work by Simon, Dave Hansen and others, the prevaling\ntheory became that kswapd is reclaiming order-3 pages requested by SLUB\ntoo aggressive about it.\n\nThere are two apparent problems here.  On the target machine, there is a\nsmall Normal zone in comparison to DMA32.  As kswapd tries to balance all\nzones, it would continually try reclaiming for Normal even though DMA32\nwas balanced enough for callers.  The second problem is that\nsleeping_prematurely() does not use the same logic as balance_pgdat() when\ndeciding whether to sleep or not.  This keeps kswapd artifically awake.\n\nA number of tests were run and the figures from previous postings will\nlook very different for a few reasons.  One, the old figures were forcing\nmy network card to use GFP_ATOMIC in attempt to replicate Simon\u0027s problem.\n Second, I previous specified slub_min_order\u003d3 again in an attempt to\nreproduce Simon\u0027s problem.  In this posting, I\u0027m depending on Simon to say\nwhether his problem is fixed or not and these figures are to show the\nimpact to the ordinary cases.  Finally, the \"vmscan\" figures are taken\nfrom /proc/vmstat instead of the tracepoints.  There is less information\nbut recording is less disruptive.\n\nThe first test of relevance was postmark with a process running in the\nbackground reading a large amount of anonymous memory in blocks.  The\nobjective was to vaguely simulate what was happening on Simon\u0027s machine\nand it\u0027s memory intensive enough to have kswapd awake.\n\nPOSTMARK\n                                            traceonly          kanyzone\nTransactions per second:              156.00 ( 0.00%)   153.00 (-1.96%)\nData megabytes read per second:        21.51 ( 0.00%)    21.52 ( 0.05%)\nData megabytes written per second:     29.28 ( 0.00%)    29.11 (-0.58%)\nFiles created alone per second:       250.00 ( 0.00%)   416.00 (39.90%)\nFiles create/transact per second:      79.00 ( 0.00%)    76.00 (-3.95%)\nFiles deleted alone per second:       520.00 ( 0.00%)   420.00 (-23.81%)\nFiles delete/transact per second:      79.00 ( 0.00%)    76.00 (-3.95%)\n\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)         16.58      17.4\nTotal Elapsed Time (seconds)                218.48    222.47\n\nVMstat Reclaim Statistics: vmscan\nDirect reclaims                                  0          4\nDirect reclaim pages scanned                     0        203\nDirect reclaim pages reclaimed                   0        184\nKswapd pages scanned                        326631     322018\nKswapd pages reclaimed                      312632     309784\nKswapd low wmark quickly                         1          4\nKswapd high wmark quickly                      122        475\nKswapd skip congestion_wait                      1          0\nPages activated                             700040     705317\nPages deactivated                           212113     203922\nPages written                                 9875       6363\n\nTotal pages scanned                         326631    322221\nTotal pages reclaimed                       312632    309968\n%age total pages scanned/reclaimed          95.71%    96.20%\n%age total pages scanned/written             3.02%     1.97%\n\nproc vmstat: Faults\nMajor Faults                                   300       254\nMinor Faults                                645183    660284\nPage ins                                    493588    486704\nPage outs                                  4960088   4986704\nSwap ins                                      1230       661\nSwap outs                                     9869      6355\n\nPerformance is mildly affected because kswapd is no longer doing as much\nwork and the background memory consumer process is getting in the way.\nNote that kswapd scanned and reclaimed fewer pages as it\u0027s less aggressive\nand overall fewer pages were scanned and reclaimed.  Swap in/out is\nparticularly reduced again reflecting kswapd throwing out fewer pages.\n\nThe slight performance impact is unfortunate here but it looks like a\ndirect result of kswapd being less aggressive.  As the bug report is about\ntoo many pages being freed by kswapd, it may have to be accepted for now.\n\nThe second test is a streaming IO benchmark that was previously used by\nJohannes to show regressions in page reclaim.\n\nMICRO\n\t\t\t\t\t traceonly  kanyzone\nUser/Sys Time Running Test (seconds)         29.29     28.87\nTotal Elapsed Time (seconds)                492.18    488.79\n\nVMstat Reclaim Statistics: vmscan\nDirect reclaims                               2128       1460\nDirect reclaim pages scanned               2284822    1496067\nDirect reclaim pages reclaimed              148919     110937\nKswapd pages scanned                      15450014   16202876\nKswapd pages reclaimed                     8503697    8537897\nKswapd low wmark quickly                      3100       3397\nKswapd high wmark quickly                     1860       7243\nKswapd skip congestion_wait                    708        801\nPages activated                               9635       9573\nPages deactivated                             1432       1271\nPages written                                  223       1130\n\nTotal pages scanned                       17734836  17698943\nTotal pages reclaimed                      8652616   8648834\n%age total pages scanned/reclaimed          48.79%    48.87%\n%age total pages scanned/written             0.00%     0.01%\n\nproc vmstat: Faults\nMajor Faults                                   165       221\nMinor Faults                               9655785   9656506\nPage ins                                      3880      7228\nPage outs                                 37692940  37480076\nSwap ins                                         0        69\nSwap outs                                       19        15\n\nAgain fewer pages are scanned and reclaimed as expected and this time the\ntest completed faster.  Note that kswapd is hitting its watermarks faster\n(low and high wmark quickly) which I expect is due to kswapd reclaiming\nfewer pages.\n\nI also ran fs-mark, iozone and sysbench but there is nothing interesting\nto report in the figures.  Performance is not significantly changed and\nthe reclaim statistics look reasonable.\n\nTgis patch:\n\nWhen the allocator enters its slow path, kswapd is woken up to balance the\nnode.  It continues working until all zones within the node are balanced.\nFor order-0 allocations, this makes perfect sense but for higher orders it\ncan have unintended side-effects.  If the zone sizes are imbalanced,\nkswapd may reclaim heavily within a smaller zone discarding an excessive\nnumber of pages.  The user-visible behaviour is that kswapd is awake and\nreclaiming even though plenty of pages are free from a suitable zone.\n\nThis patch alters the \"balance\" logic for high-order reclaim allowing\nkswapd to stop if any suitable zone becomes balanced to reduce the number\nof pages it reclaims from other zones.  kswapd still tries to ensure that\norder-0 watermarks for all zones are met before sleeping.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@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": "c585a2678d83ba8fb02fa6b197de0ac7d67377f1",
      "tree": "b722f3c6fa28d1228e34adbcb85fee8683b34069",
      "parents": [
        "e20e87795834f2f14cb53baf657b91d9c39f92c8"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "srostedt@redhat.com",
        "time": "Thu Jan 13 15:46:18 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: remove likely() from grab_cache_page_write_begin()\n\nRunning the annotated branch profiler on a box doing average work\n(firefox, evolution, xchat, distcc farm), the likely() used in\ngrab_cache_page_write_begin() was incorrect most of the time:\n\n correct incorrect  %        Function                  File              Line\n ------- ---------  -        --------                  ----              ----\n 1924262 71332401  97 grab_cache_page_write_begin    filemap.c           2206\n\nAdding a trace_printk() and running the function tracer limited to\njust this function I can see:\n\n        gconfd-2-2696  [000]  4467.268935: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d7\n        gconfd-2-2696  [000]  4467.268946: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268947: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d8\n        gconfd-2-2696  [000]  4467.268959: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268960: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d9\n        gconfd-2-2696  [000]  4467.268972: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268973: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d10\n        gconfd-2-2696  [000]  4467.268991: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268992: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d11\n        gconfd-2-2696  [000]  4467.269005: grab_cache_page_write_begin \u003c-ext3_write_begin\n\nWhich shows that a lot of calls from ext3_write_begin will result in the\npage returned by \"find_lock_page\" will be NULL.\n\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nAcked-by: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ddf9c6d472825ceda66b3adff0f6437dbcd37f71",
      "tree": "a838e5535d5bad4391dcec4584d44a0e3b05858b",
      "parents": [
        "1e50df39f6e2c3a4a3394df62baa8a213df16c54"
      ],
      "author": {
        "name": "Tobias Klauser",
        "email": "tklauser@distanz.ch",
        "time": "Thu Jan 13 15:46:15 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "vmalloc: remove redundant unlikely()\n\nIS_ERR() already implies unlikely(), so it can be omitted here.\n\nSigned-off-by: Tobias Klauser \u003ctklauser@distanz.ch\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": "1e50df39f6e2c3a4a3394df62baa8a213df16c54",
      "tree": "d437981aec4fc5cf84178f7afcca83f0ef40aea1",
      "parents": [
        "53a7706d5ed8f1a53ba062b318773160cc476dde"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Jan 13 15:46:14 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mempolicy: remove tasklist_lock from migrate_pages\n\nToday, tasklist_lock in migrate_pages doesn\u0027t protect anything.\nrcu_read_lock() provide enough protection from pid hash walk.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReported-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: 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": "53a7706d5ed8f1a53ba062b318773160cc476dde",
      "tree": "a1990d90d5af3686b7a83b2bbc2ae6463971efc5",
      "parents": [
        "5fdb2002131cd4e210b9638a4fc932ec7be491d1"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:14 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mlock: do not hold mmap_sem for extended periods of time\n\n__get_user_pages gets a new \u0027nonblocking\u0027 parameter to signal that the\ncaller is prepared to re-acquire mmap_sem and retry the operation if\nneeded.  This is used to split off long operations if they are going to\nblock on a disk transfer, or when we detect contention on the mmap_sem.\n\n[akpm@linux-foundation.org: remove ref to rwsem_is_contended()]\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@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": "5fdb2002131cd4e210b9638a4fc932ec7be491d1",
      "tree": "233dc1cab275397d211a7d5490f19192a59a47fd",
      "parents": [
        "110d74a921f4d272b47ef6104fcf937df808f4c8"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:12 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: move VM_LOCKED check to __mlock_vma_pages_range()\n\nUse a single code path for faulting in pages during mlock.\n\nThe reason to have it in this patch series is that I did not want to\nupdate both code paths in a later change that releases mmap_sem when\nblocking on disk.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@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": "110d74a921f4d272b47ef6104fcf937df808f4c8",
      "tree": "a2f1705e049f06e1cf8cbaf7d6b3261f0b46b6ab",
      "parents": [
        "fed067da46ad3b9acedaf794a5f05d0bc153280b"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:11 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: add FOLL_MLOCK follow_page flag.\n\nMove the code to mlock pages from __mlock_vma_pages_range() to\nfollow_page().\n\nThis allows __mlock_vma_pages_range() to not have to break down work into\n16-page batches.\n\nAn additional motivation for doing this within the present patch series is\nthat it\u0027ll make it easier for a later chagne to drop mmap_sem when\nblocking on disk (we\u0027d like to be able to resume at the page that was read\nfrom disk instead of at the start of a 16-page batch).\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@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": "fed067da46ad3b9acedaf794a5f05d0bc153280b",
      "tree": "ba2eadd8c3c2884d15a5a9373924b33b40bdca7e",
      "parents": [
        "5ecfda041e4b4bd858d25bbf5a16c2a6c06d7272"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:10 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "mlock: only hold mmap_sem in shared mode when faulting in pages\n\nCurrently mlock() holds mmap_sem in exclusive mode while the pages get\nfaulted in.  In the case of a large mlock, this can potentially take a\nvery long time, during which various commands such as \u0027ps auxw\u0027 will\nblock.  This makes sysadmins unhappy:\n\nreal    14m36.232s\nuser    0m0.003s\nsys     0m0.015s\n(output from \u0027time ps auxw\u0027 while a 20GB file was being mlocked without\nbeing previously preloaded into page cache)\n\nI propose that mlock() could release mmap_sem after the VM_LOCKED bits\nhave been set in all appropriate VMAs.  Then a second pass could be done\nto actually mlock the pages, in small batches, releasing mmap_sem when we\nblock on disk access or when we detect some contention.\n\nThis patch:\n\nBefore this change, mlock() holds mmap_sem in exclusive mode while the\npages get faulted in.  In the case of a large mlock, this can potentially\ntake a very long time.  Various things will block while mmap_sem is held,\nincluding \u0027ps auxw\u0027.  This can make sysadmins angry.\n\nI propose that mlock() could release mmap_sem after the VM_LOCKED bits\nhave been set in all appropriate VMAs.  Then a second pass could be done\nto actually mlock the pages with mmap_sem held for reads only.  We need to\nrecheck the vma flags after we re-acquire mmap_sem, but this is easy.\n\nIn the case where a vma has been munlocked before mlock completes, pages\nthat were already marked as PageMlocked() are handled by the munlock()\ncall, and mlock() is careful to not mark new page batches as PageMlocked()\nafter the munlock() call has cleared the VM_LOCKED vma flags.  So, the end\nresult will be identical to what\u0027d happen if munlock() had executed after\nthe mlock() call.\n\nIn a later change, I will allow the second pass to release mmap_sem when\nblocking on disk accesses or when it is otherwise contended, so that it\nwon\u0027t be held for long periods of time even in shared mode.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nTested-by: Valdis Kletnieks \u003cValdis.Kletnieks@vt.edu\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@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": "5ecfda041e4b4bd858d25bbf5a16c2a6c06d7272",
      "tree": "e6c3e7dac64a5e45b48ab7836318752202579a17",
      "parents": [
        "72ddc8f72270758951ccefb7d190f364d20215ab"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:09 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "mlock: avoid dirtying pages and triggering writeback\n\nWhen faulting in pages for mlock(), we want to break COW for anonymous or\nfile pages within VM_WRITABLE, non-VM_SHARED vmas.  However, there is no\nneed to write-fault into VM_SHARED vmas since shared file pages can be\nmlocked first and dirtied later, when/if they actually get written to.\nSkipping the write fault is desirable, as we don\u0027t want to unnecessarily\ncause these pages to be dirtied and queued for writeback.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Kosaki Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Theodore Tso \u003ctytso@google.com\u003e\nCc: Michael Rubin \u003cmrubin@google.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ],
  "next": "72ddc8f72270758951ccefb7d190f364d20215ab"
}
