)]}'
{
  "log": [
    {
      "commit": "957f822a0ab95e88b146638bad6209bbc315bedd",
      "tree": "2e1336ddc1c574f54d582c6b74dcc1d1230482f8",
      "parents": [
        "a0c5e813f087dffc0d9b173d2e7d3328b1482fd5"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Oct 08 16:33:24 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:56 2012 +0900"
      },
      "message": "mm, numa: reclaim from all nodes within reclaim distance\n\nRECLAIM_DISTANCE represents the distance between nodes at which it is\ndeemed too costly to allocate from; it\u0027s preferred to try to reclaim from\na local zone before falling back to allocating on a remote node with such\na distance.\n\nTo do this, zone_reclaim_mode is set if the distance between any two\nnodes on the system is greather than this distance.  This, however, ends\nup causing the page allocator to reclaim from every zone regardless of\nits affinity.\n\nWhat we really want is to reclaim only from zones that are closer than\nRECLAIM_DISTANCE.  This patch adds a nodemask to each node that\nrepresents the set of nodes that are within this distance.  During the\nzone iteration, if the bit for a zone\u0027s node is set for the local node,\nthen reclaim is attempted; otherwise, the zone is skipped.\n\n[akpm@linux-foundation.org: fix CONFIG_NUMA\u003dn build]\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a0c5e813f087dffc0d9b173d2e7d3328b1482fd5",
      "tree": "cc3fac50d76d0641722cb824fef825d5655e421e",
      "parents": [
        "e6c509f85455041d3d7c4b863bf80bc294288cc1"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Oct 08 16:33:21 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:56 2012 +0900"
      },
      "message": "mm: remove free_page_mlock\n\nWe should not be seeing non-0 unevictable_pgs_mlockfreed any longer.  So\nremove free_page_mlock() from the page freeing paths: __PG_MLOCKED is\nalready in PAGE_FLAGS_CHECK_AT_FREE, so free_pages_check() will now be\nchecking it, reporting \"BUG: Bad page state\" if it\u0027s ever found set.\nComment UNEVICTABLE_MLOCKFREED and unevictable_pgs_mlockfreed always 0.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Ying Han \u003cyinghan@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": "e6c509f85455041d3d7c4b863bf80bc294288cc1",
      "tree": "50ccf8e339b219851ca7ad000379b1559415e354",
      "parents": [
        "39b5f29ac1f988c1615fbc9c69f6651ab0d0c3c7"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Oct 08 16:33:19 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:56 2012 +0900"
      },
      "message": "mm: use clear_page_mlock() in page_remove_rmap()\n\nWe had thought that pages could no longer get freed while still marked as\nmlocked; but Johannes Weiner posted this program to demonstrate that\ntruncating an mlocked private file mapping containing COWed pages is still\nmishandled:\n\n#include \u003csys/types.h\u003e\n#include \u003csys/mman.h\u003e\n#include \u003csys/stat.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n\nint main(void)\n{\n\tchar *map;\n\tint fd;\n\n\tsystem(\"grep mlockfreed /proc/vmstat\");\n\tfd \u003d open(\"chigurh\", O_CREAT|O_EXCL|O_RDWR);\n\tunlink(\"chigurh\");\n\tftruncate(fd, 4096);\n\tmap \u003d mmap(NULL, 4096, PROT_WRITE, MAP_PRIVATE, fd, 0);\n\tmap[0] \u003d 11;\n\tmlock(map, sizeof(fd));\n\tftruncate(fd, 0);\n\tclose(fd);\n\tmunlock(map, sizeof(fd));\n\tmunmap(map, 4096);\n\tsystem(\"grep mlockfreed /proc/vmstat\");\n\treturn 0;\n}\n\nThe anon COWed pages are not caught by truncation\u0027s clear_page_mlock() of\nthe pagecache pages; but unmap_mapping_range() unmaps them, so we ought to\nlook out for them there in page_remove_rmap().  Indeed, why should\ntruncation or invalidation be doing the clear_page_mlock() when removing\nfrom pagecache?  mlock is a property of mapping in userspace, not a\nproperty of pagecache: an mlocked unmapped page is nonsensical.\n\nReported-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\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: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nAcked-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": "39b5f29ac1f988c1615fbc9c69f6651ab0d0c3c7",
      "tree": "d8030f58d542bb3e811d83676b38c5b4b3a16c02",
      "parents": [
        "ec4d9f626d5908b6052c2973f37992f1db52e967"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Oct 08 16:33:18 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:55 2012 +0900"
      },
      "message": "mm: remove vma arg from page_evictable\n\npage_evictable(page, vma) is an irritant: almost all its callers pass\nNULL for vma.  Remove the vma arg and use mlocked_vma_newpage(vma, page)\nexplicitly in the couple of places it\u0027s needed.  But in those places we\ndon\u0027t even need page_evictable() itself!  They\u0027re dealing with a freshly\nallocated anonymous page, which has no \"mapping\" and cannot be mlocked yet.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Ying Han \u003cyinghan@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": "ec4d9f626d5908b6052c2973f37992f1db52e967",
      "tree": "c1c0dd99680061cb506797f37ed319eb2804329f",
      "parents": [
        "7ffc0edc49d0df5dac077c1830e2533b27d3a4ed"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Oct 08 16:33:14 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:55 2012 +0900"
      },
      "message": "mm: fix invalidate_complete_page2() lock ordering\n\nIn fuzzing with trinity, lockdep protested \"possible irq lock inversion\ndependency detected\" when isolate_lru_page() reenabled interrupts while\nstill holding the supposedly irq-safe tree_lock:\n\ninvalidate_inode_pages2\n  invalidate_complete_page2\n    spin_lock_irq(\u0026mapping-\u003etree_lock)\n    clear_page_mlock\n      isolate_lru_page\n        spin_unlock_irq(\u0026zone-\u003elru_lock)\n\nisolate_lru_page() is correct to enable interrupts unconditionally:\ninvalidate_complete_page2() is incorrect to call clear_page_mlock() while\nholding tree_lock, which is supposed to nest inside lru_lock.\n\nBoth truncate_complete_page() and invalidate_complete_page() call\nclear_page_mlock() before taking tree_lock to remove page from radix_tree.\n I guess invalidate_complete_page2() preferred to test PageDirty (again)\nunder tree_lock before committing to the munlock; but since the page has\nalready been unmapped, its state is already somewhat inconsistent, and no\nworse if clear_page_mlock() moved up.\n\nReported-by: Sasha Levin \u003clevinsasha928@gmail.com\u003e\nDeciphered-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7ffc0edc49d0df5dac077c1830e2533b27d3a4ed",
      "tree": "d3a9b21a5725af5a678eb0d2d07a3848bbf65fd4",
      "parents": [
        "4bd2c1ee4b439d926e437a4841e8145230df98c9"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Mon Oct 08 16:33:13 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:55 2012 +0900"
      },
      "message": "memcg: move mem_cgroup_is_root upwards\n\nkmem code uses this function and it is better to not use forward\ndeclarations for static inline functions as some (older) compilers don\u0027t\nlike it:\n\ngcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)\n\n  mm/memcontrol.c:421: warning: `mem_cgroup_is_root\u0027 declared inline after being called\n  mm/memcontrol.c:421: warning: previous declaration of `mem_cgroup_is_root\u0027 was here\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nCc: Sachin Kamat \u003csachin.kamat@linaro.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4bd2c1ee4b439d926e437a4841e8145230df98c9",
      "tree": "b9bf448dda9bfb5d428928c7f26fd7c7aad30267",
      "parents": [
        "1939c557b5c3c0e800328e3589ae3d27fdfea29e"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Mon Oct 08 16:33:10 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:54 2012 +0900"
      },
      "message": "memcg: cleanup kmem tcp ifdefs\n\nTCP kmem accounting is currently guarded by CONFIG_MEMCG_KMEM ifdefs but\nthe code is not used if !CONFIG_INET so we should rather test for both.\nThe same applies to net/sock.h, net/ip.h and net/tcp_memcontrol.h but\nlet\u0027s keep those outside of any ifdefs because it is considered safer wrt.\n future maintainability.\n\nTested with\n- CONFIG_INET \u0026\u0026 CONFIG_MEMCG_KMEM\n- !CONFIG_INET \u0026\u0026 CONFIG_MEMCG_KMEM\n- CONFIG_INET \u0026\u0026 !CONFIG_MEMCG_KMEM\n- !CONFIG_INET \u0026\u0026 !CONFIG_MEMCG_KMEM\n\nSigned-off-by: Sachin Kamat \u003csachin.kamat@linaro.org\u003e\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Glauber Costa \u003cglommer@parallels.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1939c557b5c3c0e800328e3589ae3d27fdfea29e",
      "tree": "db7e9fd87d2e0746de1b4fce3d0056164c6c90db",
      "parents": [
        "7f1290f2f2a4d2c3f1b7ce8e87256e052ca23125"
      ],
      "author": {
        "name": "Michael Kerrisk",
        "email": "mtk.manpages@gmail.com",
        "time": "Mon Oct 08 16:33:09 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:54 2012 +0900"
      },
      "message": "memcg: trivial fixes for Documentation/cgroups/memory.txt\n\nWhile reading through Documentation/cgroups/memory.txt, I found a number\nof minor wordos and typos.  The patch below is a conservative handling of\nsome of these: it provides just a number of \"obviously correct\" fixes to\nthe English that improve the readability of the document somewhat.\nObviously some more significant fixes need to be made to the document, but\nsome of those may not be in the \"obvious correct\" category.\n\nSigned-off-by: Michael Kerrisk \u003cmtk.manpages@gmail.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7f1290f2f2a4d2c3f1b7ce8e87256e052ca23125",
      "tree": "10328fcb468647ba678e022911d5c2005080f309",
      "parents": [
        "05106e6a54aed321191b4bb5c9ee09538cbad3b1"
      ],
      "author": {
        "name": "Jianguo Wu",
        "email": "wujianguo@huawei.com",
        "time": "Mon Oct 08 16:33:06 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:54 2012 +0900"
      },
      "message": "mm: fix-up zone present pages\n\nI think zone-\u003epresent_pages indicates pages that buddy system can management,\nit should be:\n\n\tzone-\u003epresent_pages \u003d spanned pages - absent pages - bootmem pages,\n\nbut is now:\n\tzone-\u003epresent_pages \u003d spanned pages - absent pages - memmap pages.\n\nspanned pages: total size, including holes.\nabsent pages: holes.\nbootmem pages: pages used in system boot, managed by bootmem allocator.\nmemmap pages: pages used by page structs.\n\nThis may cause zone-\u003epresent_pages less than it should be.  For example,\nnuma node 1 has ZONE_NORMAL and ZONE_MOVABLE, it\u0027s memmap and other\nbootmem will be allocated from ZONE_MOVABLE, so ZONE_NORMAL\u0027s\npresent_pages should be spanned pages - absent pages, but now it also\nminus memmap pages(free_area_init_core), which are actually allocated from\nZONE_MOVABLE.  When offlining all memory of a zone, this will cause\nzone-\u003epresent_pages less than 0, because present_pages is unsigned long\ntype, it is actually a very large integer, it indirectly caused\nzone-\u003ewatermark[WMARK_MIN] becomes a large\ninteger(setup_per_zone_wmarks()), than cause totalreserve_pages become a\nlarge integer(calculate_totalreserve_pages()), and finally cause memory\nallocating failure when fork process(__vm_enough_memory()).\n\n[root@localhost ~]# dmesg\n-bash: fork: Cannot allocate memory\n\nI think the bug described in\n\n  http://marc.info/?l\u003dlinux-mm\u0026m\u003d134502182714186\u0026w\u003d2\n\nis also caused by wrong zone present pages.\n\nThis patch intends to fix-up zone-\u003epresent_pages when memory are freed to\nbuddy system on x86_64 and IA64 platforms.\n\nSigned-off-by: Jianguo Wu \u003cwujianguo@huawei.com\u003e\nSigned-off-by: Jiang Liu \u003cjiang.liu@huawei.com\u003e\nReported-by: Petr Tesarik \u003cptesarik@suse.cz\u003e\nTested-by: Petr Tesarik \u003cptesarik@suse.cz\u003e\nCc: \"Luck, Tony\" \u003ctony.luck@intel.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Yinghai Lu \u003cyinghai@kernel.org\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: David Rientjes \u003crientjes@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": "05106e6a54aed321191b4bb5c9ee09538cbad3b1",
      "tree": "ba13b2981df91a994f15224d07485b90e6840a10",
      "parents": [
        "eab1eef9911c36966b5d5934e6970581b3316013"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Mon Oct 08 16:33:03 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:53 2012 +0900"
      },
      "message": "mm: enable CONFIG_COMPACTION by default\n\nNow that lumpy reclaim has been removed, compaction is the only way left\nto free up contiguous memory areas.  It is time to just enable\nCONFIG_COMPACTION by default.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nAcked-by: Minchan Kim \u003cminchan@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "eab1eef9911c36966b5d5934e6970581b3316013",
      "tree": "3d47f3c5b9f92b2d4e626fb8fdc0c18cfedc5ffb",
      "parents": [
        "2d28a2275c21d04290cfba1555c89a806d2b7706"
      ],
      "author": {
        "name": "Catalin Marinas",
        "email": "catalin.marinas@arm.com",
        "time": "Mon Oct 08 16:33:01 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:53 2012 +0900"
      },
      "message": "mm: thp: fix the update_mmu_cache() last argument passing in mm/huge_memory.c\n\nThe update_mmu_cache() takes a pointer (to pte_t by default) as the last\nargument but the huge_memory.c passes a pmd_t value.  The patch changes\nthe argument to the pmd_t * pointer.\n\nSigned-off-by: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nSigned-off-by: Steve Capper \u003csteve.capper@arm.com\u003e\nSigned-off-by: Will Deacon \u003cwill.deacon@arm.com\u003e\nCc: Arnd Bergmann \u003carnd@arndb.de\u003e\nReviewed-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Ralf Baechle \u003cralf@linux-mips.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2d28a2275c21d04290cfba1555c89a806d2b7706",
      "tree": "a333aa3c8dd434e8f9ccc6b0f8ff80f9d9b4b357",
      "parents": [
        "e3b4126c556ca3a07699adf202d44bed3f453638"
      ],
      "author": {
        "name": "Catalin Marinas",
        "email": "catalin.marinas@arm.com",
        "time": "Mon Oct 08 16:32:59 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:53 2012 +0900"
      },
      "message": "mm: thp: fix the pmd_clear() arguments in pmdp_get_and_clear()\n\nThe CONFIG_TRANSPARENT_HUGEPAGE implementation of pmdp_get_and_clear()\ncalls pmd_clear() with 3 arguments instead of 1.\n\nThis happens only for !__HAVE_ARCH_PMDP_GET_AND_CLEAR which doesn\u0027t seem\nto happen because x86 defines this and it uses pmd_update.\n\n[mhocko@suse.cz: changelog addition]\nSigned-off-by: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nSigned-off-by: Steve Capper \u003csteve.capper@arm.com\u003e\nSigned-off-by: Will Deacon \u003cwill.deacon@arm.com\u003e\nCc: Arnd Bergmann \u003carnd@arndb.de\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e3b4126c556ca3a07699adf202d44bed3f453638",
      "tree": "b2eb0c6082dffc1e9a2629d8847a16f66cdd1345",
      "parents": [
        "74c08f982674cfd5dfeb2702d631db9bcdabf788"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:32:57 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:52 2012 +0900"
      },
      "message": "thp: khugepaged_prealloc_page() forgot to reset the page alloc indicator\n\nIf NUMA is enabled, the indicator is not reset if the previous page\nrequest failed, ausing us to trigger the BUG_ON() in\nkhugepaged_alloc_page().\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "74c08f982674cfd5dfeb2702d631db9bcdabf788",
      "tree": "6645d574ecd7fb5e7509a3cfda95605d8cfeb7f5",
      "parents": [
        "723a0644a7255f532575fd43245f9ef976491328"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:32:54 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:52 2012 +0900"
      },
      "message": "memory-hotplug: don\u0027t replace lowmem pages with highmem\n\nThe changelog for commit 6a6dccba2fdc (\"mm: cma: don\u0027t replace lowmem\npages with highmem\") mentioned that lowmem pages can be replaced by\nhighmem pages during CMA migration.  6a6dccba2fdc fixed that issue.\n\nQuote from that changelog:\n\n:   The filesystem layer expects pages in the block device\u0027s mapping to not\n:   be in highmem (the mapping\u0027s gfp mask is set in bdget()), but CMA can\n:   currently replace lowmem pages with highmem pages, leading to crashes in\n:   filesystem code such as the one below:\n:\n:     Unable to handle kernel NULL pointer dereference at virtual address 00000400\n:     pgd \u003d c0c98000\n:     [00000400] *pgd\u003d00c91831, *pte\u003d00000000, *ppte\u003d00000000\n:     Internal error: Oops: 817 [#1] PREEMPT SMP ARM\n:     CPU: 0    Not tainted  (3.5.0-rc5+ #80)\n:     PC is at __memzero+0x24/0x80\n:     ...\n:     Process fsstress (pid: 323, stack limit \u003d 0xc0cbc2f0)\n:     Backtrace:\n:     [\u003cc010e3f0\u003e] (ext4_getblk+0x0/0x180) from [\u003cc010e58c\u003e] (ext4_bread+0x1c/0x98)\n:     [\u003cc010e570\u003e] (ext4_bread+0x0/0x98) from [\u003cc0117944\u003e] (ext4_mkdir+0x160/0x3bc)\n:      r4:c15337f0\n:     [\u003cc01177e4\u003e] (ext4_mkdir+0x0/0x3bc) from [\u003cc00c29e0\u003e] (vfs_mkdir+0x8c/0x98)\n:     [\u003cc00c2954\u003e] (vfs_mkdir+0x0/0x98) from [\u003cc00c2a60\u003e] (sys_mkdirat+0x74/0xac)\n:      r6:00000000 r5:c152eb40 r4:000001ff r3:c14b43f0\n:     [\u003cc00c29ec\u003e] (sys_mkdirat+0x0/0xac) from [\u003cc00c2ab8\u003e] (sys_mkdir+0x20/0x24)\n:      r6:beccdcf0 r5:00074000 r4:beccdbbc\n:     [\u003cc00c2a98\u003e] (sys_mkdir+0x0/0x24) from [\u003cc000e3c0\u003e] (ret_fast_syscall+0x0/0x30)\n\nMemory-hotplug has same problem as CMA has so the same fix can be applied\nto memory-hotplug as well.\n\nFix it by reusing.\n\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Kamezawa Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nAcked-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nCc: Wen Congyang \u003cwency@cn.fujitsu.com\u003e\nAcked-by: David Rientjes \u003crientjes@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": "723a0644a7255f532575fd43245f9ef976491328",
      "tree": "1dfca4e804a7031889af36dbbf2a991637333680",
      "parents": [
        "3f6d4caeb9a9d8f7e5bbf3f49f1fd71e1414ff64"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:32:52 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:52 2012 +0900"
      },
      "message": "mm/page_alloc: refactor out __alloc_contig_migrate_alloc()\n\n__alloc_contig_migrate_alloc() can be used by memory-hotplug so refactor\nit out (move + rename as a common name) into page_isolation.c.\n\n[akpm@linux-foundation.org: checkpatch fixes]\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Kamezawa Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nAcked-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nCc: Wen Congyang \u003cwency@cn.fujitsu.com\u003e\nAcked-by: David Rientjes \u003crientjes@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": "3f6d4caeb9a9d8f7e5bbf3f49f1fd71e1414ff64",
      "tree": "8abe1c946db6104fbad7e16136265568a12a6af1",
      "parents": [
        "62997027ca5b3d4618198ed8b1aba40b61b1137b"
      ],
      "author": {
        "name": "Sachin Kamat",
        "email": "sachin.kamat@linaro.org",
        "time": "Mon Oct 08 16:32:50 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:51 2012 +0900"
      },
      "message": "mm/hugetlb.c: remove duplicate inclusion of header file\n\nSigned-off-by: Sachin Kamat \u003csachin.kamat@linaro.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "62997027ca5b3d4618198ed8b1aba40b61b1137b",
      "tree": "cf26352e091ae10f7201d98ca774a8c0e5f8cdfd",
      "parents": [
        "c89511ab2f8fe2b47585e60da8af7fd213ec877e"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:47 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:51 2012 +0900"
      },
      "message": "mm: compaction: clear PG_migrate_skip based on compaction and reclaim activity\n\nCompaction caches if a pageblock was scanned and no pages were isolated so\nthat the pageblocks can be skipped in the future to reduce scanning.  This\ninformation is not cleared by the page allocator based on activity due to\nthe impact it would have to the page allocator fast paths.  Hence there is\na requirement that something clear the cache or pageblocks will be skipped\nforever.  Currently the cache is cleared if there were a number of recent\nallocation failures and it has not been cleared within the last 5 seconds.\nTime-based decisions like this are terrible as they have no relationship\nto VM activity and is basically a big hammer.\n\nUnfortunately, accurate heuristics would add cost to some hot paths so\nthis patch implements a rough heuristic.  There are two cases where the\ncache is cleared.\n\n1. If a !kswapd process completes a compaction cycle (migrate and free\n   scanner meet), the zone is marked compact_blockskip_flush. When kswapd\n   goes to sleep, it will clear the cache. This is expected to be the\n   common case where the cache is cleared. It does not really matter if\n   kswapd happens to be asleep or going to sleep when the flag is set as\n   it will be woken on the next allocation request.\n\n2. If there have been multiple failures recently and compaction just\n   finished being deferred then a process will clear the cache and start a\n   full scan.  This situation happens if there are multiple high-order\n   allocation requests under heavy memory pressure.\n\nThe clearing of the PG_migrate_skip bits and other scans is inherently\nracy but the race is harmless.  For allocations that can fail such as THP,\nthey will simply fail.  For requests that cannot fail, they will retry the\nallocation.  Tests indicated that scanning rates were roughly similar to\nwhen the time-based heuristic was used and the allocation success rates\nwere similar.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nCc: Rafael Aquini \u003caquini@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": "c89511ab2f8fe2b47585e60da8af7fd213ec877e",
      "tree": "c6b04cb5335957e8409edc77ca23ef012d9d326d",
      "parents": [
        "bb13ffeb9f6bfeb301443994dfbf29f91117dfb3"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:45 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:50 2012 +0900"
      },
      "message": "mm: compaction: Restart compaction from near where it left off\n\nThis is almost entirely based on Rik\u0027s previous patches and discussions\nwith him about how this might be implemented.\n\nOrder \u003e 0 compaction stops when enough free pages of the correct page\norder have been coalesced.  When doing subsequent higher order\nallocations, it is possible for compaction to be invoked many times.\n\nHowever, the compaction code always starts out looking for things to\ncompact at the start of the zone, and for free pages to compact things to\nat the end of the zone.\n\nThis can cause quadratic behaviour, with isolate_freepages starting at the\nend of the zone each time, even though previous invocations of the\ncompaction code already filled up all free memory on that end of the zone.\n This can cause isolate_freepages to take enormous amounts of CPU with\ncertain workloads on larger memory systems.\n\nThis patch caches where the migration and free scanner should start from\non subsequent compaction invocations using the pageblock-skip information.\n When compaction starts it begins from the cached restart points and will\nupdate the cached restart points until a page is isolated or a pageblock\nis skipped that would have been scanned by synchronous compaction.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bb13ffeb9f6bfeb301443994dfbf29f91117dfb3",
      "tree": "45e0e6574c0165da9cdc993b3401fe3263e4761c",
      "parents": [
        "753341a4b85ff337487b9959c71c529f522004f4"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:41 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:50 2012 +0900"
      },
      "message": "mm: compaction: cache if a pageblock was scanned and no pages were isolated\n\nWhen compaction was implemented it was known that scanning could\npotentially be excessive.  The ideal was that a counter be maintained for\neach pageblock but maintaining this information would incur a severe\npenalty due to a shared writable cache line.  It has reached the point\nwhere the scanning costs are a serious problem, particularly on\nlong-lived systems where a large process starts and allocates a large\nnumber of THPs at the same time.\n\nInstead of using a shared counter, this patch adds another bit to the\npageblock flags called PG_migrate_skip.  If a pageblock is scanned by\neither migrate or free scanner and 0 pages were isolated, the pageblock is\nmarked to be skipped in the future.  When scanning, this bit is checked\nbefore any scanning takes place and the block skipped if set.\n\nThe main difficulty with a patch like this is \"when to ignore the cached\ninformation?\" If it\u0027s ignored too often, the scanning rates will still be\nexcessive.  If the information is too stale then allocations will fail\nthat might have otherwise succeeded.  In this patch\n\no CMA always ignores the information\no If the migrate and free scanner meet then the cached information will\n  be discarded if it\u0027s at least 5 seconds since the last time the cache\n  was discarded\no If there are a large number of allocation failures, discard the cache.\n\nThe time-based heuristic is very clumsy but there are few choices for a\nbetter event.  Depending solely on multiple allocation failures still\nallows excessive scanning when THP allocations are failing in quick\nsuccession due to memory pressure.  Waiting until memory pressure is\nrelieved would cause compaction to continually fail instead of using\nreclaim/compaction to try allocate the page.  The time-based mechanism is\nclumsy but a better option is not obvious.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nCc: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nCc: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nCc: Mark Brown \u003cbroonie@opensource.wolfsonmicro.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "753341a4b85ff337487b9959c71c529f522004f4",
      "tree": "6a705fd73dd599e7eeb58cb06e84c86c07c03a64",
      "parents": [
        "f40d1e42bb988d2a26e8e111ea4c4c7bac819b7e"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:40 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:50 2012 +0900"
      },
      "message": "revert \"mm: have order \u003e 0 compaction start off where it left\"\n\nThis reverts commit 7db8889ab05b (\"mm: have order \u003e 0 compaction start\noff where it left\") and commit de74f1cc (\"mm: have order \u003e 0 compaction\nstart near a pageblock with free pages\").  These patches were a good\nidea and tests confirmed that they massively reduced the amount of\nscanning but the implementation is complex and tricky to understand.  A\nlater patch will cache what pageblocks should be skipped and\nreimplements the concept of compact_cached_free_pfn on top for both\nmigration and free scanners.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nAcked-by: Minchan Kim \u003cminchan@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f40d1e42bb988d2a26e8e111ea4c4c7bac819b7e",
      "tree": "71c930024b943dfd5dee0b5bd912f73747e4478e",
      "parents": [
        "2a1402aa044b55c2d30ab0ed9405693ef06fb07c"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:36 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:49 2012 +0900"
      },
      "message": "mm: compaction: acquire the zone-\u003elock as late as possible\n\nCompaction\u0027s free scanner acquires the zone-\u003elock when checking for\nPageBuddy pages and isolating them.  It does this even if there are no\nPageBuddy pages in the range.\n\nThis patch defers acquiring the zone lock for as long as possible.  In the\nevent there are no free pages in the pageblock then the lock will not be\nacquired at all which reduces contention on zone-\u003elock.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nAcked-by: Minchan Kim \u003cminchan@kernel.org\u003e\nTested-by: Peter Ujfalusi \u003cpeter.ujfalusi@ti.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2a1402aa044b55c2d30ab0ed9405693ef06fb07c",
      "tree": "d286a88cc0882663143ec67d54cd3b1247ef2829",
      "parents": [
        "661c4cb9b829110cb68c18ea05a56be39f75a4d2"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:33 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:49 2012 +0900"
      },
      "message": "mm: compaction: acquire the zone-\u003elru_lock as late as possible\n\nRichard Davies and Shaohua Li have both reported lock contention problems\nin compaction on the zone and LRU locks as well as significant amounts of\ntime being spent in compaction.  This series aims to reduce lock\ncontention and scanning rates to reduce that CPU usage.  Richard reported\nat https://lkml.org/lkml/2012/9/21/91 that this series made a big\ndifferent to a problem he reported in August:\n\n   http://marc.info/?l\u003dkvm\u0026m\u003d134511507015614\u0026w\u003d2\n\nPatch 1 defers acquiring the zone-\u003elru_lock as long as possible.\n\nPatch 2 defers acquiring the zone-\u003elock as lock as possible.\n\nPatch 3 reverts Rik\u0027s \"skip-free\" patches as the core concept gets\n\treimplemented later and the remaining patches are easier to\n\tunderstand if this is reverted first.\n\nPatch 4 adds a pageblock-skip bit to the pageblock flags to cache what\n\tpageblocks should be skipped by the migrate and free scanners.\n\tThis drastically reduces the amount of scanning compaction has\n\tto do.\n\nPatch 5 reimplements something similar to Rik\u0027s idea except it uses the\n\tpageblock-skip information to decide where the scanners should\n\trestart from and does not need to wrap around.\n\nI tested this on 3.6-rc6 + linux-next/akpm. Kernels tested were\n\nakpm-20120920\t3.6-rc6 + linux-next/akpm as of Septeber 20th, 2012\nlesslock\tPatches 1-6\nrevert\t\tPatches 1-7\ncachefail\tPatches 1-8\nskipuseless\tPatches 1-9\n\nStress high-order allocation tests looked ok.  Success rates are more or\nless the same with the full series applied but there is an expectation\nthat there is less opportunity to race with other allocation requests if\nthere is less scanning.  The time to complete the tests did not vary that\nmuch and are uninteresting as were the vmstat statistics so I will not\npresent them here.\n\nUsing ftrace I recorded how much scanning was done by compaction and got this\n\n                            3.6.0-rc6     3.6.0-rc6   3.6.0-rc6  3.6.0-rc6 3.6.0-rc6\n                            akpm-20120920 lockless  revert-v2r2  cachefail skipuseless\n\nTotal   free    scanned         360753976  515414028  565479007   17103281   18916589\nTotal   free    isolated          2852429    3597369    4048601     670493     727840\nTotal   free    efficiency        0.0079%    0.0070%    0.0072%    0.0392%    0.0385%\nTotal   migrate scanned         247728664  822729112 1004645830   17946827   14118903\nTotal   migrate isolated          2555324    3245937    3437501     616359     658616\nTotal   migrate efficiency        0.0103%    0.0039%    0.0034%    0.0343%    0.0466%\n\nThe efficiency is worthless because of the nature of the test and the\nnumber of failures.  The really interesting point as far as this patch\nseries is concerned is the number of pages scanned.  Note that reverting\nRik\u0027s patches massively increases the number of pages scanned indicating\nthat those patches really did make a difference to CPU usage.\n\nHowever, caching what pageblocks should be skipped has a much higher\nimpact.  With patches 1-8 applied, free page and migrate page scanning are\nboth reduced by 95% in comparison to the akpm kernel.  If the basic\nconcept of Rik\u0027s patches are implemened on top then scanning then the free\nscanner barely changed but migrate scanning was further reduced.  That\nsaid, tests on 3.6-rc5 indicated that the last patch had greater impact\nthan what was measured here so it is a bit variable.\n\nOne way or the other, this series has a large impact on the amount of\nscanning compaction does when there is a storm of THP allocations.\n\nThis patch:\n\nCompaction\u0027s migrate scanner acquires the zone-\u003elru_lock when scanning a\nrange of pages looking for LRU pages to acquire.  It does this even if\nthere are no LRU pages in the range.  If multiple processes are compacting\nthen this can cause severe locking contention.  To make matters worse\ncommit b2eef8c0 (\"mm: compaction: minimise the time IRQs are disabled\nwhile isolating pages for migration\") releases the lru_lock every\nSWAP_CLUSTER_MAX pages that are scanned.\n\nThis patch makes two changes to how the migrate scanner acquires the LRU\nlock.  First, it only releases the LRU lock every SWAP_CLUSTER_MAX pages\nif the lock is contended.  This reduces the number of times it\nunnecessarily disables and re-enables IRQs.  The second is that it defers\nacquiring the LRU lock for as long as possible.  If there are no LRU pages\nor the only LRU pages are transhuge then the LRU lock will not be acquired\nat all which reduces contention on zone-\u003elru_lock.\n\n[minchan@kernel.org: augment comment]\n[akpm@linux-foundation.org: tweak comment text]\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Richard Davies \u003crichard@arachsys.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nAcked-by: Rafael Aquini \u003caquini@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "661c4cb9b829110cb68c18ea05a56be39f75a4d2",
      "tree": "1ad0a9ac6cd93534b7355423a30f3281b45cd6ee",
      "parents": [
        "3cc668f4e30fbd97b3c0574d8cac7a83903c9bc7"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:31 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:49 2012 +0900"
      },
      "message": "mm: compaction: Update try_to_compact_pages()kerneldoc comment\n\nParameters were added without documentation, tut tut.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3cc668f4e30fbd97b3c0574d8cac7a83903c9bc7",
      "tree": "851c570e1af7c3c888d7106d3942ab861039b3b9",
      "parents": [
        "e64c5237cf6ff474cb2f3f832f48f2b441dd9979"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Mon Oct 08 16:32:30 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:48 2012 +0900"
      },
      "message": "mm: compaction: move fatal signal check out of compact_checklock_irqsave\n\nCommit c67fe3752abe (\"mm: compaction: Abort async compaction if locks\nare contended or taking too long\") addressed a lock contention problem\nin compaction by introducing compact_checklock_irqsave() that effecively\naborting async compaction in the event of compaction.\n\nTo preserve existing behaviour it also moved a fatal_signal_pending()\ncheck into compact_checklock_irqsave() but that is very misleading.  It\n\"hides\" the check within a locking function but has nothing to do with\nlocking as such.  It just happens to work in a desirable fashion.\n\nThis patch moves the fatal_signal_pending() check to\nisolate_migratepages_range() where it belongs.  Arguably the same check\nshould also happen when isolating pages for freeing but it\u0027s overkill.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Minchan Kim \u003cminchan@kernel.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": "e64c5237cf6ff474cb2f3f832f48f2b441dd9979",
      "tree": "88fb8ec8e9e2d32051aaacf90a306f7b124e4135",
      "parents": [
        "f2d52fe51c8c0a18cf5fbe583bad51090d12c146"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shli@kernel.org",
        "time": "Mon Oct 08 16:32:27 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:48 2012 +0900"
      },
      "message": "mm: compaction: abort compaction loop if lock is contended or run too long\n\nisolate_migratepages_range() might isolate no pages if for example when\nzone-\u003elru_lock is contended and running asynchronous compaction. In this\ncase, we should abort compaction, otherwise, compact_zone will run a\nuseless loop and make zone-\u003elru_lock is even contended.\n\nAn additional check is added to ensure that cc.migratepages and\ncc.freepages get properly drained whan compaction is aborted.\n\n[minchan@kernel.org: Putback pages isolated for migration if aborting]\n[akpm@linux-foundation.org: compact_zone_order requires non-NULL arg contended]\n[akpm@linux-foundation.org: make compact_zone_order() require non-NULL arg `contended\u0027]\n[minchan@kernel.org: Putback pages isolated for migration if aborting]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Shaohua Li \u003cshli@fusionio.com\u003e\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Minchan Kim \u003cminchan@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f2d52fe51c8c0a18cf5fbe583bad51090d12c146",
      "tree": "ab7ffa1804c4d97f6aed88e02cb5fa7a19021e75",
      "parents": [
        "e9d24ad30fc5c4c601824fb39712350b053ca812"
      ],
      "author": {
        "name": "Wanpeng Li",
        "email": "liwanp@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:32:24 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:47 2012 +0900"
      },
      "message": "mm/memblock: cleanup early_node_map[] related comments\n\nCommit 0ee332c14518 (\"memblock: Kill early_node_map[]\") removed\nearly_node_map[].  Clean up the comments to comply with that change.\n\nSigned-off-by: Wanpeng Li \u003cliwanp@linux.vnet.ibm.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Gavin Shan \u003cshangw@linux.vnet.ibm.com\u003e\nCc: Yinghai Lu \u003cyinghai@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e9d24ad30fc5c4c601824fb39712350b053ca812",
      "tree": "6dbff4457b29fd7f694c219b97114b8a1d893cca",
      "parents": [
        "45cac65b0fcd287ebb877b141d40ba9bbe8e5da7"
      ],
      "author": {
        "name": "Wanpeng Li",
        "email": "liwanp@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:32:21 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:47 2012 +0900"
      },
      "message": "mm/memblock: use existing interface to set nid\n\nUse the existing interface function to set the NUMA node ID (NID) for the\nregions, either memory or reserved region.\n\nSigned-off-by: Wanpeng Li \u003cliwanp@linux.vnet.ibm.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Gavin Shan \u003cshangw@linux.vnet.ibm.com\u003e\nCc: Yinghai Lu \u003cyinghai@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "45cac65b0fcd287ebb877b141d40ba9bbe8e5da7",
      "tree": "30ed25c91aaeed153de51a78d171cb14582e383f",
      "parents": [
        "e79bee24fd6134f90af4228cfebd010136d67631"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shli@kernel.org",
        "time": "Mon Oct 08 16:32:19 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:47 2012 +0900"
      },
      "message": "readahead: fault retry breaks mmap file read random detection\n\n.fault now can retry.  The retry can break state machine of .fault.  In\nfilemap_fault, if page is miss, ra-\u003emmap_miss is increased.  In the second\ntry, since the page is in page cache now, ra-\u003emmap_miss is decreased.  And\nthese are done in one fault, so we can\u0027t detect random mmap file access.\n\nAdd a new flag to indicate .fault is tried once.  In the second try, skip\nra-\u003emmap_miss decreasing.  The filemap_fault state machine is ok with it.\n\nI only tested x86, didn\u0027t test other archs, but looks the change for other\narchs is obvious, but who knows :)\n\nSigned-off-by: Shaohua Li \u003cshaohua.li@fusionio.com\u003e\nCc: Rik van Riel \u003criel@redhat.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": "e79bee24fd6134f90af4228cfebd010136d67631",
      "tree": "ecc678106bbf4672becca8f798aaf94276eaa2c4",
      "parents": [
        "435b405c06119d93333738172b8060b0ed12af41"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shli@kernel.org",
        "time": "Mon Oct 08 16:32:18 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:46 2012 +0900"
      },
      "message": "atomic: implement generic atomic_dec_if_positive()\n\nThe x86 implementation of atomic_dec_if_positive is quite generic, so make\nit available to all architectures.\n\nThis is needed for \"swap: add a simple detector for inappropriate swapin\nreadahead\".\n\n[akpm@linux-foundation.org: do the \"#define foo foo\" trick in the conventional manner]\nSigned-off-by: Shaohua Li \u003cshli@fusionio.com\u003e\nCc: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: Michal Simek \u003cmonstr@monstr.eu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "435b405c06119d93333738172b8060b0ed12af41",
      "tree": "a87f9a493f5c677ab23eeab1eab2e45caeb79bc3",
      "parents": [
        "41d575ad4a511b71a4a41c8313004212f5c229b1"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:32:16 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:46 2012 +0900"
      },
      "message": "memory-hotplug: fix pages missed by race rather than failing\n\nIf race between allocation and isolation in memory-hotplug offline\nhappens, some pages could be in MIGRATE_MOVABLE of free_list although the\npageblock\u0027s migratetype of the page is MIGRATE_ISOLATE.\n\nThe race could be detected by get_freepage_migratetype in\n__test_page_isolated_in_pageblock.  If it is detected, now EBUSY gets\nbubbled all the way up and the hotplug operations fails.\n\nBut better idea is instead of returning and failing memory-hotremove, move\nthe free page to the correct list at the time it is detected.  It could\nenhance memory-hotremove operation success ratio although the race is\nreally rare.\n\nSuggested by Mel Gorman.\n\n[akpm@linux-foundation.org: small cleanup]\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Xishi Qiu \u003cqiuxishi@huawei.com\u003e\nCc: Wen Congyang \u003cwency@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": "41d575ad4a511b71a4a41c8313004212f5c229b1",
      "tree": "04d9fe90086a7c4be7b680c3adc592086baccfe5",
      "parents": [
        "95e3441248053fc06bbb1dbbd34409a84211619e"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:32:14 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:46 2012 +0900"
      },
      "message": "memory-hotplug: bug fix race between isolation and allocation\n\nLike below, memory-hotplug makes race between page-isolation\nand page-allocation so it can hit BUG_ON in __offline_isolated_pages.\n\n\tCPU A\t\t\t\t\tCPU B\n\nstart_isolate_page_range\nset_migratetype_isolate\nspin_lock_irqsave(zone-\u003elock)\n\n\t\t\t\tfree_hot_cold_page(Page A)\n\t\t\t\t/* without zone-\u003elock */\n\t\t\t\tmigratetype \u003d get_pageblock_migratetype(Page A);\n\t\t\t\t/*\n\t\t\t\t * Page could be moved into MIGRATE_MOVABLE\n\t\t\t\t * of per_cpu_pages\n\t\t\t\t */\n\t\t\t\tlist_add_tail(\u0026page-\u003elru, \u0026pcp-\u003elists[migratetype]);\n\nset_pageblock_isolate\nmove_freepages_block\ndrain_all_pages\n\n\t\t\t\t/* Page A could be in MIGRATE_MOVABLE of free_list. */\n\ncheck_pages_isolated\n__test_page_isolated_in_pageblock\n/*\n * We can\u0027t catch freed page which\n * is free_list[MIGRATE_MOVABLE]\n */\nif (PageBuddy(page A))\n\tpfn +\u003d 1 \u003c\u003c page_order(page A);\n\n\t\t\t\t/* So, Page A could be allocated */\n\n__offline_isolated_pages\n/*\n * BUG_ON hit or offline page\n * which is used by someone\n */\nBUG_ON(!PageBuddy(page A));\n\nThis patch checks page\u0027s migratetype in freelist in\n__test_page_isolated_in_pageblock.  So now\n__test_page_isolated_in_pageblock can check the page caused by above race\nand can fail of memory offlining.\n\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Xishi Qiu \u003cqiuxishi@huawei.com\u003e\nCc: Wen Congyang \u003cwency@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": "95e3441248053fc06bbb1dbbd34409a84211619e",
      "tree": "8c8312184b515826ca4343fa81b77d703d291398",
      "parents": [
        "b12c4ad14ee0232ad47c2bef404b6d42a3578332"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:32:11 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:45 2012 +0900"
      },
      "message": "mm: remain migratetype in freed page\n\nThe page allocator caches the pageblock information in page-\u003eprivate while\nit is in the PCP freelists but this is overwritten with the order of the\npage when freed to the buddy allocator.  This patch stores the migratetype\nof the page in the page-\u003eindex field so that it is available at all times\nwhen the page remain in free_list.\n\nThis patch adds a new call site in __free_pages_ok so it might be overhead\na bit but it\u0027s for high order allocation.  So I believe damage isn\u0027t hurt.\n\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Xishi Qiu \u003cqiuxishi@huawei.com\u003e\nCc: Wen Congyang \u003cwency@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": "b12c4ad14ee0232ad47c2bef404b6d42a3578332",
      "tree": "9fc0d3fa799b7aef83f824eb538f0b75c3af0683",
      "parents": [
        "d95ea5d18e699515468368415c93ed49b1a3221b"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:32:08 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:45 2012 +0900"
      },
      "message": "mm: page_alloc: use get_freepage_migratetype() instead of page_private()\n\nThe page allocator uses set_page_private and page_private for handling\nmigratetype when it frees page.  Let\u0027s replace them with [set|get]\n_freepage_migratetype to make it more clear.\n\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Xishi Qiu \u003cqiuxishi@huawei.com\u003e\nCc: Wen Congyang \u003cwency@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": "d95ea5d18e699515468368415c93ed49b1a3221b",
      "tree": "5e4828e1ad279462c64c08dd305905e610418d90",
      "parents": [
        "d1ce749a0db12202b711d1aba1d29e823034648d"
      ],
      "author": {
        "name": "Bartlomiej Zolnierkiewicz",
        "email": "b.zolnierkie@samsung.com",
        "time": "Mon Oct 08 16:32:05 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:45 2012 +0900"
      },
      "message": "cma: fix watermark checking\n\n* Add ALLOC_CMA alloc flag and pass it to [__]zone_watermark_ok()\n  (from Minchan Kim).\n\n* During watermark check decrease available free pages number by\n  free CMA pages number if necessary (unmovable allocations cannot\n  use pages from CMA areas).\n\nSigned-off-by: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nCc: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\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": "d1ce749a0db12202b711d1aba1d29e823034648d",
      "tree": "b9b1f0e1d4fcda9ab900575f42f5ddc155d28648",
      "parents": [
        "2139cbe627b8910ded55148f87ee10f7485408ed"
      ],
      "author": {
        "name": "Bartlomiej Zolnierkiewicz",
        "email": "b.zolnierkie@samsung.com",
        "time": "Mon Oct 08 16:32:02 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:44 2012 +0900"
      },
      "message": "cma: count free CMA pages\n\nAdd NR_FREE_CMA_PAGES counter to be later used for checking watermark in\n__zone_watermark_ok().  For simplicity and to avoid #ifdef hell make this\ncounter always available (not only when CONFIG_CMA\u003dy).\n\n[akpm@linux-foundation.org: use conventional migratetype naming]\nSigned-off-by: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nCc: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\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": "2139cbe627b8910ded55148f87ee10f7485408ed",
      "tree": "e42678cc486717e39391bfc71ca0e5671468210e",
      "parents": [
        "770c8aaaf6f04a87e6765f24d497132de9152a46"
      ],
      "author": {
        "name": "Bartlomiej Zolnierkiewicz",
        "email": "b.zolnierkie@samsung.com",
        "time": "Mon Oct 08 16:32:00 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:44 2012 +0900"
      },
      "message": "cma: fix counting of isolated pages\n\nIsolated free pages shouldn\u0027t be accounted to NR_FREE_PAGES counter.  Fix\nit by properly decreasing/increasing NR_FREE_PAGES counter in\nset_migratetype_isolate()/unset_migratetype_isolate() and removing counter\nadjustment for isolated pages from free_one_page() and split_free_page().\n\nSigned-off-by: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nCc: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\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": "770c8aaaf6f04a87e6765f24d497132de9152a46",
      "tree": "c93d594ad97750bee9115778ddc160e0414c342a",
      "parents": [
        "02c6de8d757cb32c0829a45d81c3dfcbcafd998b"
      ],
      "author": {
        "name": "Bartlomiej Zolnierkiewicz",
        "email": "b.zolnierkie@samsung.com",
        "time": "Mon Oct 08 16:31:57 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:44 2012 +0900"
      },
      "message": "mm: fix tracing in free_pcppages_bulk()\n\npage-\u003eprivate gets re-used in __free_one_page() to store page order\n(so trace_mm_page_pcpu_drain() may print order instead of migratetype)\nthus migratetype value must be cached locally.\n\nFixes regression introduced in commit a7016235a61d (\"mm: fix migratetype\nbug which slowed swapping\").  This caused incorrect data to be attached\nto the mm_page_pcpu_drain trace event.\n\n[akpm@linux-foundation.org: add comment]\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nCc: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nAcked-by: Minchan Kim \u003cminchan@kernel.org\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Bartlomiej Zolnierkiewicz \u003cb.zolnierkie@samsung.com\u003e\nSigned-off-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nAcked-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": "02c6de8d757cb32c0829a45d81c3dfcbcafd998b",
      "tree": "0d8f0d182a44ba4ec4af0c909d01eb663e03e254",
      "parents": [
        "70400303ce0c4ced3139499c676d5c79636b0c72"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Oct 08 16:31:55 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:43 2012 +0900"
      },
      "message": "mm: cma: discard clean pages during contiguous allocation instead of migration\n\nDrop clean cache pages instead of migration during alloc_contig_range() to\nminimise allocation latency by reducing the amount of migration that is\nnecessary.  It\u0027s useful for CMA because latency of migration is more\nimportant than evicting the background process\u0027s working set.  In\naddition, as pages are reclaimed then fewer free pages for migration\ntargets are required so it avoids memory reclaiming to get free pages,\nwhich is a contributory factor to increased latency.\n\nI measured elapsed time of __alloc_contig_migrate_range() which migrates\n10M in 40M movable zone in QEMU machine.\n\nBefore - 146ms, After - 7ms\n\n[akpm@linux-foundation.org: fix nommu build]\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nReviewed-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Marek Szyprowski \u003cm.szyprowski@samsung.com\u003e\nAcked-by: Michal Nazarewicz \u003cmina86@mina86.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nTested-by: Kyungmin Park \u003ckyungmin.park@samsung.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "70400303ce0c4ced3139499c676d5c79636b0c72",
      "tree": "c9203f4dad6d1147739c264c24cfea625b1ff026",
      "parents": [
        "1e8537baacd59e96bbe5f8d3d32feafd11f509fe"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Mon Oct 08 16:31:52 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:43 2012 +0900"
      },
      "message": "mm: mmu_notifier: make the mmu_notifier srcu static\n\nThe variable must be static especially given the variable name.\n\ns/RCU/SRCU/ over a few comments.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Sagi Grimberg \u003csagig@mellanox.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Haggai Eran \u003chaggaie@mellanox.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1e8537baacd59e96bbe5f8d3d32feafd11f509fe",
      "tree": "43c06a9d398687ef2c7225ab1af0ae8ed4e24676",
      "parents": [
        "38a76013ad809beb0b52f60d365c960d035bd83c"
      ],
      "author": {
        "name": "Xishi Qiu",
        "email": "qiuxishi@huawei.com",
        "time": "Mon Oct 08 16:31:51 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:43 2012 +0900"
      },
      "message": "memory-hotplug: build zonelists when offlining pages\n\nonline_pages() does build_all_zonelists() and zone_pcp_update(), I think\noffline_pages() should do it too.\n\nWhen the zone has no memory to allocate, remove it from other nodes\u0027\nzonelists.  zone_batchsize() depends on zone\u0027s present pages, if zone\u0027s\npresent pages are changed, zone\u0027s pcp should be updated.\n\nSigned-off-by: Xishi Qiu \u003cqiuxishi@huawei.com\u003e\nCc: Yasuaki Ishimatsu \u003cisimatu.yasuaki@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": "38a76013ad809beb0b52f60d365c960d035bd83c",
      "tree": "c63ba707ab17dd1ff1e90650faf74570daa3cf9f",
      "parents": [
        "523d4e2008fd4a68b1a164e63e8c75b7b20f07e0"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:50 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:42 2012 +0900"
      },
      "message": "mm: avoid taking rmap locks in move_ptes()\n\nDuring mremap(), the destination VMA is generally placed after the\noriginal vma in rmap traversal order: in move_vma(), we always have\nnew_pgoff \u003e\u003d vma-\u003evm_pgoff, and as a result new_vma-\u003evm_pgoff \u003e\u003d\nvma-\u003evm_pgoff unless vma_merge() merged the new vma with an adjacent one.\n\nWhen the destination VMA is placed after the original in rmap traversal\norder, we can avoid taking the rmap locks in move_ptes().\n\nEssentially, this reintroduces the optimization that had been disabled in\n\"mm anon rmap: remove anon_vma_moveto_tail\".  The difference is that we\ndon\u0027t try to impose the rmap traversal order; instead we just rely on\nthings being in the desired order in the common case and fall back to\ntaking locks in the uncommon case.  Also we skip the i_mmap_mutex in\naddition to the anon_vma lock: in both cases, the vmas are traversed in\nincreasing vm_pgoff order with ties resolved in tree insertion order.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.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": "523d4e2008fd4a68b1a164e63e8c75b7b20f07e0",
      "tree": "c51d7fe7c6c614cf4cf8ef09f923a502cc18d279",
      "parents": [
        "ed8ea8150182f8d715fceb3b175ef0a9ebacd872"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:48 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:42 2012 +0900"
      },
      "message": "mm anon rmap: in mremap, set the new vma\u0027s position before anon_vma_clone()\n\nanon_vma_clone() expects new_vma-\u003evm_{start,end,pgoff} to be correctly set\nso that the new vma can be indexed on the anon interval tree.\n\ncopy_vma() was failing to do that, which broke mremap().\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Jiri Slaby \u003cjslaby@suse.cz\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nTested-by: Sasha Levin \u003clevinsasha928@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": "ed8ea8150182f8d715fceb3b175ef0a9ebacd872",
      "tree": "3af48f3a947df4dc5a0df660988f61d454a88cf2",
      "parents": [
        "86c2ad19956f84f2191e062fcb979367b6365871"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:45 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:42 2012 +0900"
      },
      "message": "mm: add CONFIG_DEBUG_VM_RB build option\n\nAdd a CONFIG_DEBUG_VM_RB build option for the previously existing\nDEBUG_MM_RB code.  Now that Andi Kleen modified it to avoid using\nrecursive algorithms, we can expose it a bit more.\n\nAlso extend this code to validate_mm() after stack expansion, and to check\nthat the vma\u0027s start and last pgoffs have not changed since the nodes were\ninserted on the anon vma interval tree (as it is important that the nodes\nbe reindexed after each such update).\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.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": "86c2ad19956f84f2191e062fcb979367b6365871",
      "tree": "bca7d7106964266b24ecfa1256d2586a315571cf",
      "parents": [
        "bf181b9f9d8dfbba58b23441ad60d0bc33806d64"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:42 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:41 2012 +0900"
      },
      "message": "mm rmap: remove vma_address check for address inside vma\n\nIn file and anon rmap, we use interval trees to find potentially relevant\nvmas and then call vma_address() to find the virtual address the given\npage might be found at in these vmas.  vma_address() used to include a\ncheck that the returned address falls within the limits of the vma, but\nthis check isn\u0027t necessary now that we always use interval trees in rmap:\nthe interval tree just doesn\u0027t return any vmas which this check would find\nto be irrelevant.  As a result, we can replace the use of -EFAULT error\ncode (which then needed to be checked in every call site) with a\nVM_BUG_ON().\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.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": "bf181b9f9d8dfbba58b23441ad60d0bc33806d64",
      "tree": "7ad0caaf8998f31c5d910dcbb768f5a1d381b5f4",
      "parents": [
        "108d6642ad81bb1d62b401490a334d2c12397517"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:39 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:41 2012 +0900"
      },
      "message": "mm anon rmap: replace same_anon_vma linked list with an interval tree.\n\nWhen a large VMA (anon or private file mapping) is first touched, which\nwill populate its anon_vma field, and then split into many regions through\nthe use of mprotect(), the original anon_vma ends up linking all of the\nvmas on a linked list.  This can cause rmap to become inefficient, as we\nhave to walk potentially thousands of irrelevent vmas before finding the\none a given anon page might fall into.\n\nBy replacing the same_anon_vma linked list with an interval tree (where\neach avc\u0027s interval is determined by its vma\u0027s start and last pgoffs), we\ncan make rmap efficient for this use case again.\n\nWhile the change is large, all of its pieces are fairly simple.\n\nMost places that were walking the same_anon_vma list were looking for a\nknown pgoff, so they can just use the anon_vma_interval_tree_foreach()\ninterval tree iterator instead.  The exception here is ksm, where the\npage\u0027s index is not known.  It would probably be possible to rework ksm so\nthat the index would be known, but for now I have decided to keep things\nsimple and just walk the entirety of the interval tree there.\n\nWhen updating vma\u0027s that already have an anon_vma assigned, we must take\ncare to re-index the corresponding avc\u0027s on their interval tree.  This is\ndone through the use of anon_vma_interval_tree_pre_update_vma() and\nanon_vma_interval_tree_post_update_vma(), which remove the avc\u0027s from\ntheir interval tree before the update and re-insert them after the update.\n The anon_vma stays locked during the update, so there is no chance that\nrmap would miss the vmas that are being updated.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.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": "108d6642ad81bb1d62b401490a334d2c12397517",
      "tree": "27df7d1777d80b9dddeaefaac928b726ff82a816",
      "parents": [
        "9826a516ff77c5820e591211e4f3e58ff36f46be"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:36 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:41 2012 +0900"
      },
      "message": "mm anon rmap: remove anon_vma_moveto_tail\n\nmremap() had a clever optimization where move_ptes() did not take the\nanon_vma lock to avoid a race with anon rmap users such as page migration.\n Instead, the avc\u0027s were ordered in such a way that the origin vma was\nalways visited by rmap before the destination.  This ordering and the use\nof page table locks rmap usage safe.  However, we want to replace the use\nof linked lists in anon rmap with an interval tree, and this will make it\nharder to impose such ordering as the interval tree will always be sorted\nby the avc-\u003evma-\u003evm_pgoff value.  For now, let\u0027s replace the\nanon_vma_moveto_tail() ordering function with proper anon_vma locking in\nmove_ptes().  Once we have the anon interval tree in place, we will\nre-introduce an optimization to avoid taking these locks in the most\ncommon cases.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.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": "9826a516ff77c5820e591211e4f3e58ff36f46be",
      "tree": "bdec1e2fe5ff95569795069bac73977faba17d57",
      "parents": [
        "9c079add0d0f45220f4bb37febf0621137ec2d38"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:35 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:40 2012 +0900"
      },
      "message": "mm: interval tree updates\n\nUpdate the generic interval tree code that was introduced in \"mm: replace\nvma prio_tree with an interval tree\".\n\nChanges:\n\n- fixed \u0027endpoing\u0027 typo noticed by Andrew Morton\n\n- replaced include/linux/interval_tree_tmpl.h, which was used as a\n  template (including it automatically defined the interval tree\n  functions) with include/linux/interval_tree_generic.h, which only\n  defines a preprocessor macro INTERVAL_TREE_DEFINE(), which itself\n  defines the interval tree functions when invoked. Now that is a very\n  long macro which is unfortunate, but it does make the usage sites\n  (lib/interval_tree.c and mm/interval_tree.c) a bit nicer than previously.\n\n- make use of RB_DECLARE_CALLBACKS() in the INTERVAL_TREE_DEFINE() macro,\n  instead of duplicating that code in the interval tree template.\n\n- replaced vma_interval_tree_add(), which was actually handling the\n  nonlinear and interval tree cases, with vma_interval_tree_insert_after()\n  which handles only the interval tree case and has an API that is more\n  consistent with the other interval tree handling functions.\n  The nonlinear case is now handled explicitly in kernel/fork.c dup_mmap().\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.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": "9c079add0d0f45220f4bb37febf0621137ec2d38",
      "tree": "ce6ba6d7e2d517a2004de856c882f2a08af12be2",
      "parents": [
        "147e615f83c2c36caf89e7a3bf78090ade6f266c"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:33 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:40 2012 +0900"
      },
      "message": "rbtree: move augmented rbtree functionality to rbtree_augmented.h\n\nProvide rb_insert_augmented() and rb_erase_augmented() through a new\nrbtree_augmented.h include file.  rb_erase_augmented() is defined there as\nan __always_inline function, in order to allow inlining of augmented\nrbtree callbacks into it.  Since this generates a relatively large\nfunction, each augmented rbtree user should make sure to have a single\ncall site.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "147e615f83c2c36caf89e7a3bf78090ade6f266c",
      "tree": "0cd64fd67f4b55bbe364217911a8100827c8b04f",
      "parents": [
        "85d3a316c714197f94e75c1e5b2d37607d66e5de"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:30 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:40 2012 +0900"
      },
      "message": "prio_tree: remove\n\nAfter both prio_tree users have been converted to use red-black trees,\nthere is no need to keep around the prio tree library anymore.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "85d3a316c714197f94e75c1e5b2d37607d66e5de",
      "tree": "3a53a0ed058c1bb9647ea0f4da2d5e2fd97f68cc",
      "parents": [
        "6b2dbba8b6ac4df26f72eda1e5ea7bab9f950e08"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:27 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:39 2012 +0900"
      },
      "message": "kmemleak: use rbtree instead of prio tree\n\nkmemleak uses a tree where each node represents an allocated memory object\nin order to quickly find out what object a given address is part of.\nHowever, the objects don\u0027t overlap, so rbtrees are a better choice than\nprio tree for this use.  They are both faster and have lower memory\noverhead.\n\nTested by booting a kernel with kmemleak enabled, loading the\nkmemleak_test module, and looking for the expected messages.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nAcked-by: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nTested-by: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "6b2dbba8b6ac4df26f72eda1e5ea7bab9f950e08",
      "tree": "422ed8d7ac2fe45069f20cfba84a9a097bf444af",
      "parents": [
        "fff3fd8a1210a165252cd7cd01206da7a90d3a06"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:25 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:39 2012 +0900"
      },
      "message": "mm: replace vma prio_tree with an interval tree\n\nImplement an interval tree as a replacement for the VMA prio_tree.  The\nalgorithms are similar to lib/interval_tree.c; however that code can\u0027t be\ndirectly reused as the interval endpoints are not explicitly stored in the\nVMA.  So instead, the common algorithm is moved into a template and the\ndetails (node type, how to get interval endpoints from the node, etc) are\nfilled in using the C preprocessor.\n\nOnce the interval tree functions are available, using them as a\nreplacement to the VMA prio tree is a relatively simple, mechanical job.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "fff3fd8a1210a165252cd7cd01206da7a90d3a06",
      "tree": "3db89d48720ba726999e9d8486d8e991c7664123",
      "parents": [
        "3908836aa77e3621aaf2101f2920e01d7c8460d6"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:23 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:39 2012 +0900"
      },
      "message": "rbtree: add prio tree and interval tree tests\n\nPatch 1 implements support for interval trees, on top of the augmented\nrbtree API. It also adds synthetic tests to compare the performance of\ninterval trees vs prio trees. Short answers is that interval trees are\nslightly faster (~25%) on insert/erase, and much faster (~2.4 - 3x)\non search. It is debatable how realistic the synthetic test is, and I have\nnot made such measurements yet, but my impression is that interval trees\nwould still come out faster.\n\nPatch 2 uses a preprocessor template to make the interval tree generic,\nand uses it as a replacement for the vma prio_tree.\n\nPatch 3 takes the other prio_tree user, kmemleak, and converts it to use\na basic rbtree. We don\u0027t actually need the augmented rbtree support here\nbecause the intervals are always non-overlapping.\n\nPatch 4 removes the now-unused prio tree library.\n\nPatch 5 proposes an additional optimization to rb_erase_augmented, now\nproviding it as an inline function so that the augmented callbacks can be\ninlined in. This provides an additional 5-10% performance improvement\nfor the interval tree insert/erase benchmark. There is a maintainance cost\nas it exposes augmented rbtree users to some of the rbtree library internals;\nhowever I think this cost shouldn\u0027t be too high as I expect the augmented\nrbtree will always have much less users than the base rbtree.\n\nI should probably add a quick summary of why I think it makes sense to\nreplace prio trees with augmented rbtree based interval trees now.  One of\nthe drivers is that we need augmented rbtrees for Rik\u0027s vma gap finding\ncode, and once you have them, it just makes sense to use them for interval\ntrees as well, as this is the simpler and more well known algorithm.  prio\ntrees, in comparison, seem *too* clever: they impose an additional \u0027heap\u0027\nconstraint on the tree, which they use to guarantee a faster worst-case\ncomplexity of O(k+log N) for stabbing queries in a well-balanced prio\ntree, vs O(k*log N) for interval trees (where k\u003dnumber of matches,\nN\u003dnumber of intervals).  Now this sounds great, but in practice prio trees\ndon\u0027t realize this theorical benefit.  First, the additional constraint\nmakes them harder to update, so that the kernel implementation has to\nsimplify things by balancing them like a radix tree, which is not always\nideal.  Second, the fact that there are both index and heap properties\nmakes both tree manipulation and search more complex, which results in a\nhigher multiplicative time constant.  As it turns out, the simple interval\ntree algorithm ends up running faster than the more clever prio tree.\n\nThis patch:\n\nAdd two test modules:\n\n- prio_tree_test measures the performance of lib/prio_tree.c, both for\n  insertion/removal and for stabbing searches\n\n- interval_tree_test measures the performance of a library of equivalent\n  functionality, built using the augmented rbtree support.\n\nIn order to support the second test module, lib/interval_tree.c is\nintroduced. It is kept separate from the interval_tree_test main file\nfor two reasons: first we don\u0027t want to provide an unfair advantage\nover prio_tree_test by having everything in a single compilation unit,\nand second there is the possibility that the interval tree functionality\ncould get some non-test users in kernel over time.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3908836aa77e3621aaf2101f2920e01d7c8460d6",
      "tree": "3e8f5b619f9e093d9d53180bb6f496319ddeb946",
      "parents": [
        "9d9e6f9703bbd642f3f2f807e6aaa642a4cbcec9"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:21 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:38 2012 +0900"
      },
      "message": "rbtree: add RB_DECLARE_CALLBACKS() macro\n\nAs proposed by Peter Zijlstra, this makes it easier to define the augmented\nrbtree callbacks.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9d9e6f9703bbd642f3f2f807e6aaa642a4cbcec9",
      "tree": "6d0061d6c1369bb006da753cc2cea55df60efe0f",
      "parents": [
        "14b94af0b251a2c80885b60538166fb7d04a642e"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:20 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:38 2012 +0900"
      },
      "message": "rbtree: remove prior augmented rbtree implementation\n\nconvert arch/x86/mm/pat_rbtree.c to the proposed augmented rbtree api\nand remove the old augmented rbtree implementation.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "14b94af0b251a2c80885b60538166fb7d04a642e",
      "tree": "ef447d340435c441f8c3e54eb8f26f747aa73108",
      "parents": [
        "dadf93534f125b9eda486b471446a8456a603d27"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:17 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:37 2012 +0900"
      },
      "message": "rbtree: faster augmented rbtree manipulation\n\nIntroduce new augmented rbtree APIs that allow minimal recalculation of\naugmented node information.\n\nA new callback is added to the rbtree insertion and erase rebalancing\nfunctions, to be called on each tree rotations. Such rotations preserve\nthe subtree\u0027s root augmented value, but require recalculation of the one\nchild that was previously located at the subtree root.\n\nIn the insertion case, the handcoded search phase must be updated to\nmaintain the augmented information on insertion, and then the rbtree\ncoloring/rebalancing algorithms keep it up to date.\n\nIn the erase case, things are more complicated since it is library\ncode that manipulates the rbtree in order to remove internal nodes.\nThis requires a couple additional callbacks to copy a subtree\u0027s\naugmented value when a new root is stitched in, and to recompute\naugmented values down the ancestry path when a node is removed from\nthe tree.\n\nIn order to preserve maximum speed for the non-augmented case,\nwe provide two versions of each tree manipulation function.\nrb_insert_augmented() is the augmented equivalent of rb_insert_color(),\nand rb_erase_augmented() is the augmented equivalent of rb_erase().\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dadf93534f125b9eda486b471446a8456a603d27",
      "tree": "4d796ac97a940683d008fdcb2040dc84d1405970",
      "parents": [
        "4f035ad67f4633c233cb3642711d49b4efc9c82d"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:15 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:37 2012 +0900"
      },
      "message": "rbtree: augmented rbtree test\n\nSmall test to measure the performance of augmented rbtrees.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4f035ad67f4633c233cb3642711d49b4efc9c82d",
      "tree": "151fd5ff00a07da479805a01cb8b1d370db72d8f",
      "parents": [
        "46b6135a7402ac23c5b25f2bd79b03bab8f98278"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:13 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:37 2012 +0900"
      },
      "message": "rbtree: low level optimizations in rb_erase()\n\nVarious minor optimizations in rb_erase():\n- Avoid multiple loading of node-\u003e__rb_parent_color when computing parent\n  and color information (possibly not in close sequence, as there might\n  be further branches in the algorithm)\n- In the 1-child subcase of case 1, copy the __rb_parent_color field from\n  the erased node to the child instead of recomputing it from the desired\n  parent and color\n- When searching for the erased node\u0027s successor, differentiate between\n  cases 2 and 3 based on whether any left links were followed. This avoids\n  a condition later down.\n- In case 3, keep a pointer to the erased node\u0027s right child so we don\u0027t\n  have to refetch it later to adjust its parent.\n- In the no-childs subcase of cases 2 and 3, place the rebalance assigment\n  last so that the compiler can remove the following if(rebalance) test.\n\nAlso, added some comments to illustrate cases 2 and 3.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "46b6135a7402ac23c5b25f2bd79b03bab8f98278",
      "tree": "8430c191a455b1ff48c62229731ded4cbc71a9a1",
      "parents": [
        "60670b8034d6e2ba860af79c9379b7788d09db73"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:11 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:37 2012 +0900"
      },
      "message": "rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()\n\nAn interesting observation for rb_erase() is that when a node has\nexactly one child, the node must be black and the child must be red.\nAn interesting consequence is that removing such a node can be done by\nsimply replacing it with its child and making the child black,\nwhich we can do efficiently in rb_erase(). __rb_erase_color() then\nonly needs to handle the no-childs case and can be modified accordingly.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "60670b8034d6e2ba860af79c9379b7788d09db73",
      "tree": "5fed30a98d29a03c078f756275ba34c830fee36c",
      "parents": [
        "7abc704ae399fcb9c51ca200b0456f8a975a8011"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:10 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:36 2012 +0900"
      },
      "message": "rbtree: place easiest case first in rb_erase()\n\nIn rb_erase, move the easy case (node to erase has no more than\n1 child) first. I feel the code reads easier that way.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7abc704ae399fcb9c51ca200b0456f8a975a8011",
      "tree": "3180bbf50ef3d25f0647362ecc7e7925f884d738",
      "parents": [
        "28d7530928d01638678f63c3c70113540b0e6abe"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:07 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:36 2012 +0900"
      },
      "message": "rbtree: add __rb_change_child() helper function\n\nAdd __rb_change_child() as an inline helper function to replace code that\nwould otherwise be duplicated 4 times in the source.\n\nNo changes to binary size or speed.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "28d7530928d01638678f63c3c70113540b0e6abe",
      "tree": "24360edfdb268991264c9722bc232c0e8dd2612b",
      "parents": [
        "59633abf34e2f44b8e772a2c12a92132aa7c2220"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:04 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:36 2012 +0900"
      },
      "message": "rbtree test: fix sparse warning about 64-bit constant\n\nJust a small fix to make sparse happy.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nReported-by: Fengguang Wu \u003cwfg@linux.intel.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "59633abf34e2f44b8e772a2c12a92132aa7c2220",
      "tree": "3a260a6100ae2c3e2dbade989c3692234081f1c7",
      "parents": [
        "7ce6ff9e5de99e7b72019c7de82fb438fe1dc5a0"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:02 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:35 2012 +0900"
      },
      "message": "rbtree: optimize fetching of sibling node\n\nWhen looking to fetch a node\u0027s sibling, we went through a sequence of:\n- check if node is the parent\u0027s left child\n- if it is, then fetch the parent\u0027s right child\n\nThis can be replaced with:\n- fetch the parent\u0027s right child as an assumed sibling\n- check that node is NOT the fetched child\n\nThis avoids fetching the parent\u0027s left child when node is actually\nthat child. Saves a bit on code size, though it doesn\u0027t seem to make\na large difference in speed.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7ce6ff9e5de99e7b72019c7de82fb438fe1dc5a0",
      "tree": "8caa4509f6421f5e923a1dc361013db629f80f54",
      "parents": [
        "6280d2356fd8ad0936a63c10dc1e6accf48d0c61"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:31:01 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:35 2012 +0900"
      },
      "message": "rbtree: coding style adjustments\n\nSet comment and indentation style to be consistent with linux coding style\nand the rest of the file, as suggested by Peter Zijlstra\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "6280d2356fd8ad0936a63c10dc1e6accf48d0c61",
      "tree": "867b959cc5441f5af443965acc60d2e78dc7fec0",
      "parents": [
        "e125d1471a4f8f1bf7ea9a83deb8d23cb40bd712"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:57 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:35 2012 +0900"
      },
      "message": "rbtree: low level optimizations in __rb_erase_color()\n\nIn __rb_erase_color(), we often already have pointers to the nodes being\nrotated and/or know what their colors must be, so we can generate more\nefficient code than the generic __rb_rotate_left() and __rb_rotate_right()\nfunctions.\n\nAlso when the current node is red or when flipping the sibling\u0027s color,\nthe parent is already known so we can use the more efficient\nrb_set_parent_color() function to set the desired color.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e125d1471a4f8f1bf7ea9a83deb8d23cb40bd712",
      "tree": "00c6bb561cdb8d0cb455563aa233bffe73b7e6db",
      "parents": [
        "d6ff1273928ebf15466a85b7e1810cd00e72998b"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:54 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:34 2012 +0900"
      },
      "message": "rbtree: optimize case selection logic in __rb_erase_color()\n\nIn __rb_erase_color(), we have to select one of 3 cases depending on the\ncolor on the \u0027other\u0027 node children.  If both children are black, we flip a\nfew node colors and iterate.  Otherwise, we do either one or two tree\nrotations, depending on the color of the \u0027other\u0027 child opposite to \u0027node\u0027,\nand then we are done.\n\nThe corresponding logic had duplicate checks for the color of the \u0027other\u0027\nchild opposite to \u0027node\u0027.  It was checking it first to determine if both\nchildren are black, and then to determine how many tree rotations are\nrequired.  Rearrange the logic to avoid that extra check.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d6ff1273928ebf15466a85b7e1810cd00e72998b",
      "tree": "709cd0702c1ae1366994382bcd170c37ea857149",
      "parents": [
        "5bc9188aa207dafd47eab57df7c4fe5b3d3f636a"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:50 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:34 2012 +0900"
      },
      "message": "rbtree: adjust node color in __rb_erase_color() only when necessary\n\nIn __rb_erase_color(), we were always setting a node to black after\nexiting the main loop.  And in one case, after fixing up the tree to\nsatisfy all rbtree invariants, we were setting the current node to root\njust to guarantee a loop exit, at which point the root would be set to\nblack.  However this is not necessary, as the root of an rbtree is already\nknown to be black.  The only case where the color flip is required is when\nwe exit the loop due to the current node being red, and it\u0027s easiest to\njust do the flip at that point instead of doing it after the loop.\n\n[adrian.hunter@intel.com: perf tools: fix build for another rbtree.c change]\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Adrian Hunter \u003cadrian.hunter@intel.com\u003e\nCc: Alexander Shishkin \u003calexander.shishkin@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": "5bc9188aa207dafd47eab57df7c4fe5b3d3f636a",
      "tree": "09bce40b0253f38250dd180315d7b3fa22999988",
      "parents": [
        "6d58452dc066db61acdff7b84671db1b11a3de1c"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:47 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:34 2012 +0900"
      },
      "message": "rbtree: low level optimizations in rb_insert_color()\n\n- Use the newly introduced rb_set_parent_color() function to flip the color\n  of nodes whose parent is already known.\n- Optimize rb_parent() when the node is known to be red - there is no need\n  to mask out the color in that case.\n- Flipping gparent\u0027s color to red requires us to fetch its rb_parent_color\n  field, so we can reuse it as the parent value for the next loop iteration.\n- Do not use __rb_rotate_left() and __rb_rotate_right() to handle tree\n  rotations: we already have pointers to all relevant nodes, and know their\n  colors (either because we want to adjust it, or because we\u0027ve tested it,\n  or we can deduce it as black due to the node proximity to a known red node).\n  So we can generate more efficient code by making use of the node pointers\n  we already have, and setting both the parent and color attributes for\n  nodes all at once. Also in Case 2, some node attributes don\u0027t have to\n  be set because we know another tree rotation (Case 3) will always follow\n  and override them.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "6d58452dc066db61acdff7b84671db1b11a3de1c",
      "tree": "36df08157d975398c5416d068f83cd31b79ae2c7",
      "parents": [
        "1f0528653e41ec230c60f5738820e8a544731399"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:44 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:33 2012 +0900"
      },
      "message": "rbtree: adjust root color in rb_insert_color() only when necessary\n\nThe root node of an rbtree must always be black.  However,\nrb_insert_color() only needs to maintain this invariant when it has been\nbroken - that is, when it exits the loop due to the current (red) node\nbeing the root.  In all other cases (exiting after tree rotations, or\nexiting due to an existing black parent) the invariant is already\nsatisfied, so there is no need to adjust the root node color.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1f0528653e41ec230c60f5738820e8a544731399",
      "tree": "f07f4eb1ed58122b810b586839833e0c015b681c",
      "parents": [
        "910a742d4ba863848c7283d69c21bfa779d3b9a8"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:42 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:33 2012 +0900"
      },
      "message": "rbtree: break out of rb_insert_color loop after tree rotation\n\nIt is a well known property of rbtrees that insertion never requires more\nthan two tree rotations.  In our implementation, after one loop iteration\nidentified one or two necessary tree rotations, we would iterate and look\nfor more.  However at that point the node\u0027s parent would always be black,\nwhich would cause us to exit the loop.\n\nWe can make the code flow more obvious by just adding a break statement\nafter the tree rotations, where we know we are done.  Additionally, in the\ncases where two tree rotations are necessary, we don\u0027t have to update the\n\u0027node\u0027 pointer as it wouldn\u0027t be used until the next loop iteration, which\nwe now avoid due to this break statement.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "910a742d4ba863848c7283d69c21bfa779d3b9a8",
      "tree": "324d473754194d806fdd254f5a4e58dfc8b4a221",
      "parents": [
        "bf7ad8eeab995710c766df49c9c69a8592ca0216"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:39 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:33 2012 +0900"
      },
      "message": "rbtree: performance and correctness test\n\nThis small module helps measure the performance of rbtree insert and\nerase.\n\nAdditionally, we run a few correctness tests to check that the rbtrees\nhave all desired properties:\n\n- contains the right number of nodes in the order desired,\n- never two consecutive red nodes on any path,\n- all paths to leaf nodes have the same number of black nodes,\n- root node is black\n\n[akpm@linux-foundation.org: fix printk warning: sparc64 cycles_t is unsigned long]\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bf7ad8eeab995710c766df49c9c69a8592ca0216",
      "tree": "737988d677b8ea408a44a58a949cc0e8eda02440",
      "parents": [
        "ea5272f5c94fb2ee62f4f15a5b88eef6184cd506"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:37 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:32 2012 +0900"
      },
      "message": "rbtree: move some implementation details from rbtree.h to rbtree.c\n\nrbtree users must use the documented APIs to manipulate the tree\nstructure.  Low-level helpers to manipulate node colors and parenthood are\nnot part of that API, so move them to lib/rbtree.c\n\n[dwmw2@infradead.org: fix jffs2 build issue due to renamed __rb_parent_color field]\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: David Woodhouse \u003cDavid.Woodhouse@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": "ea5272f5c94fb2ee62f4f15a5b88eef6184cd506",
      "tree": "819666fc929bcc50c434feba5f99beb44ed1ac7d",
      "parents": [
        "4c199a93a2d36b277a9fd209a0f2793f8460a215"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:35 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:32 2012 +0900"
      },
      "message": "rbtree: fix incorrect rbtree node insertion in fs/proc/proc_sysctl.c\n\nThe recently added code to use rbtrees in sysctl did not follow the proper\nrbtree interface on insertion - it was calling rb_link_node() which\ninserts a new node into the binary tree, but missed the call to\nrb_insert_color() which properly balances the rbtree and establishes all\nexpected rbtree invariants.\n\nI found out about this only because faulty commit also used\nrb_init_node(), which I am removing within this patchset.  But I think\nit\u0027s an easy mistake to make, and it makes me wonder if we should change\nthe rbtree API so that insertions would be done with a single rb_insert()\ncall (even if its implementation could still inline the rb_link_node()\npart and call a private __rb_insert_color function to do the rebalancing).\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4c199a93a2d36b277a9fd209a0f2793f8460a215",
      "tree": "b7d6af9220ef445eb4a9f5f0966a3bc5306fe513",
      "parents": [
        "1457d2877864d918c546735bd89c29d5e2a542f1"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:32 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:32 2012 +0900"
      },
      "message": "rbtree: empty nodes have no color\n\nEmpty nodes have no color.  We can make use of this property to simplify\nthe code emitted by the RB_EMPTY_NODE and RB_CLEAR_NODE macros.  Also,\nwe can get rid of the rb_init_node function which had been introduced by\ncommit 88d19cf37952 (\"timers: Add rb_init_node() to allow for stack\nallocated rb nodes\") to avoid some issue with the empty node\u0027s color not\nbeing initialized.\n\nI\u0027m not sure what the RB_EMPTY_NODE checks in rb_prev() / rb_next() are\ndoing there, though.  axboe introduced them in commit 10fd48f2376d\n(\"rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev\").  The way I\nsee it, the \u0027empty node\u0027 abstraction is only used by rbtree users to\nflag nodes that they haven\u0027t inserted in any rbtree, so asking the\npredecessor or successor of such nodes doesn\u0027t make any sense.\n\nOne final rb_init_node() caller was recently added in sysctl code to\nimplement faster sysctl name lookups.  This code doesn\u0027t make use of\nRB_EMPTY_NODE at all, and from what I could see it only called\nrb_init_node() under the mistaken assumption that such initialization was\nrequired before node insertion.\n\n[sfr@canb.auug.org.au: fix net/ceph/osd_client.c build]\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: John Stultz \u003cjohn.stultz@linaro.org\u003e\nSigned-off-by: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1457d2877864d918c546735bd89c29d5e2a542f1",
      "tree": "e15204c2fe46d359b357f963e99a3906ed7eb2e5",
      "parents": [
        "1638113d9d8b7e04c1eeae9014d43f6381a74040"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:28 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:31 2012 +0900"
      },
      "message": "rbtree: reference Documentation/rbtree.txt for usage instructions\n\nI recently started looking at the rbtree code (with an eye towards\nimproving the augmented rbtree support, but I haven\u0027t gotten there yet).\nI noticed a lot of possible speed improvements, which I am now proposing\nin this patch set.\n\nPatches 1-4 are preparatory: remove internal functions from rbtree.h so\nthat users won\u0027t be tempted to use them instead of the documented APIs,\nclean up some incorrect usages I\u0027ve noticed (in particular, with the\nrecently added fs/proc/proc_sysctl.c rbtree usage), reference the\ndocumentation so that people have one less excuse to miss it, etc.\n\nPatch 5 is a small module I wrote to check the rbtree performance.  It\ncreates 100 nodes with random keys and repeatedly inserts and erases them\nfrom an rbtree.  Additionally, it has code to check for rbtree invariants\nafter each insert or erase operation.\n\nPatches 6-12 is where the rbtree optimizations are done, and they touch\nonly that one file, lib/rbtree.c .  I am getting good results out of these\n- in my small benchmark doing rbtree insertion (including search) and\nerase, I\u0027m seeing a 30% runtime reduction on Sandybridge E5, which is more\nthan I initially thought would be possible.  (the results aren\u0027t as\nimpressive on my two other test hosts though, AMD barcelona and Intel\nWestmere, where I am seeing 14% runtime reduction only).  The code size -\nboth source (ommiting comments) and compiled - is also shorter after these\nchanges.  However, I do admit that the updated code is more arduous to\nread - one big reason for that is the removal of the tree rotation\nhelpers, which added some overhead but also made it easier to reason about\nthings locally.  Overall, I believe this is an acceptable compromise,\ngiven that this code doesn\u0027t get modified very often, and that I have good\ntests for it.\n\nUpon Peter\u0027s suggestion, I added comments showing the rtree configuration\nbefore every rotation.  I think they help; however it\u0027s still best to have\na copy of the cormen/leiserson/rivest book when digging into this code.\n\nThis patch: reference Documentation/rbtree.txt for usage instructions\n\ninclude/linux/rbtree.h included some basic usage instructions, while\nDocumentation/rbtree.txt had some more complete and easier to follow\ninstructions.  Replacing the former with a reference to the latter.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Daniel Santos \u003cdaniel.santos@pobox.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1638113d9d8b7e04c1eeae9014d43f6381a74040",
      "tree": "6eccf05889ebd3ebf916a602b4c8dc74b2f8105f",
      "parents": [
        "1ae1c1d09f220ded48ee9a7d91a65e94f95c4af1"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:26 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:31 2012 +0900"
      },
      "message": "ipc/mqueue: remove unnecessary rb_init_node() calls\n\nCommit d6629859b36d (\"ipc/mqueue: improve performance of send/recv\") and\nce2d52cc (\"ipc/mqueue: add rbtree node caching support\") introduced an\nrbtree of message priorities, and usage of rb_init_node() to initialize\nthe corresponding nodes.  As it turns out, rb_init_node() is unnecessary\nhere, as the nodes are fully initialized on insertion by rb_link_node()\nand the code doesn\u0027t access nodes that aren\u0027t inserted on the rbtree.\n\nRemoving the rb_init_node() calls as I removed that function during\nrbtree API cleanups (the only other use of it was in a place that\nsimilarly didn\u0027t require it).\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Doug Ledford \u003cdledford@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": "1ae1c1d09f220ded48ee9a7d91a65e94f95c4af1",
      "tree": "3c6e53c880a946dccb33b81116ca048800b28214",
      "parents": [
        "274023da1e8a49efa6fd9bf857f8557e5db44cdf"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:24 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:31 2012 +0900"
      },
      "message": "thp, s390: architecture backend for thp on s390\n\nThis implements the architecture backend for transparent hugepages\non s390.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "274023da1e8a49efa6fd9bf857f8557e5db44cdf",
      "tree": "0e741e23da15593646404f06f202c22e497b1ec4",
      "parents": [
        "9501d09fa3c4ca18971083dfb0c9aa1afc85f19c"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:21 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:30 2012 +0900"
      },
      "message": "thp, s390: disable thp for kvm host on s390\n\nThis patch is part of the architecture backend for thp on s390.  It\ndisables thp for kvm hosts, because there is no kvm host hugepage support\nso far.  Existing thp mappings are split by follow_page() with FOLL_SPLIT,\nand future thp mappings are prevented by setting VM_NOHUGEPAGE in\nmm-\u003edef_flags.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "9501d09fa3c4ca18971083dfb0c9aa1afc85f19c",
      "tree": "62c8a0d16e02e0201935ae99921b554148a36bbe",
      "parents": [
        "75077afbec1ac89178c1542b23a70d0f960b0aaf"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:18 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:30 2012 +0900"
      },
      "message": "thp, s390: thp pagetable pre-allocation for s390\n\nThis patch is part of the architecture backend for thp on s390.  It\nprovides the pagetable pre-allocation functions\npgtable_trans_huge_deposit() and pgtable_trans_huge_withdraw().  Unlike\nother archs, s390 has no struct page * as pgtable_t, but rather a pointer\nto the page table.  So instead of saving the pagetable pre- allocation\nlist info inside the struct page, it is being saved within the pagetable\nitself.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "75077afbec1ac89178c1542b23a70d0f960b0aaf",
      "tree": "843b8a7175de7a9a2dca37d877cd742121f4b627",
      "parents": [
        "8e72033f2a489b6c98c4e3c7cc281b1afd6cb85c"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:15 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:30 2012 +0900"
      },
      "message": "thp, s390: thp splitting backend for s390\n\nThis patch is part of the architecture backend for thp on s390.  It\nprovides the functions related to thp splitting, including serialization\nagainst gup.  Unlike other archs, pmdp_splitting_flush() cannot use a tlb\nflushing operation to serialize against gup on s390, because that wouldn\u0027t\nbe stopped by the disabled IRQs.  So instead, smp_call_function() is\ncalled with an empty function, which will have the expected effect.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "8e72033f2a489b6c98c4e3c7cc281b1afd6cb85c",
      "tree": "9ac78daf640471e00f3f0fbe22f6c24fb95b8817",
      "parents": [
        "46dcde735c9d8953bbd8d105ca6779e5b5300c28"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:12 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:30 2012 +0900"
      },
      "message": "thp: make MADV_HUGEPAGE check for mm-\u003edef_flags\n\nThis adds a check to hugepage_madvise(), to refuse MADV_HUGEPAGE if\nVM_NOHUGEPAGE is set in mm-\u003edef_flags.  On s390, the VM_NOHUGEPAGE flag\nwill be set in mm-\u003edef_flags for kvm processes, to prevent any future thp\nmappings.  In order to also prevent MADV_HUGEPAGE on such an mm,\nhugepage_madvise() should check mm-\u003edef_flags.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "46dcde735c9d8953bbd8d105ca6779e5b5300c28",
      "tree": "48298fd35d0ef0091541bad482f06202aba97ad3",
      "parents": [
        "e3ebcf64381188a2744a9829a4eb5c2b60f1974c"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:09 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:29 2012 +0900"
      },
      "message": "thp: introduce pmdp_invalidate()\n\nOn s390, a valid page table entry must not be changed while it is attached\nto any CPU.  So instead of pmd_mknotpresent() and set_pmd_at(), an IDTE\noperation would be necessary there.  This patch introduces the\npmdp_invalidate() function, to allow architecture-specific\nimplementations.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "e3ebcf64381188a2744a9829a4eb5c2b60f1974c",
      "tree": "6c2bc18729bd6fc12b93d82403fad6afec319c3b",
      "parents": [
        "15626062f4a98279c59a2a5208c496cf65cbf8c0"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:07 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:29 2012 +0900"
      },
      "message": "thp: remove assumptions on pgtable_t type\n\nThe thp page table pre-allocation code currently assumes that pgtable_t is\nof type \"struct page *\".  This may not be true for all architectures, so\nthis patch removes that assumption by replacing the functions\nprepare_pmd_huge_pte() and get_pmd_huge_pte() with two new functions that\ncan be defined architecture-specific.\n\nIt also removes two VM_BUG_ON checks for page_count() and page_mapcount()\noperating on a pgtable_t.  Apart from the VM_BUG_ON removal, there will be\nno functional change introduced by this patch.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "15626062f4a98279c59a2a5208c496cf65cbf8c0",
      "tree": "793c32816204cc879c1c80065c5cc24789ab4b3b",
      "parents": [
        "ca42b26ab285edc5ee3f9faa48379d258db53c35"
      ],
      "author": {
        "name": "Gerald Schaefer",
        "email": "gerald.schaefer@de.ibm.com",
        "time": "Mon Oct 08 16:30:04 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:29 2012 +0900"
      },
      "message": "thp, x86: introduce HAVE_ARCH_TRANSPARENT_HUGEPAGE\n\nCleanup patch in preparation for transparent hugepage support on s390.\nAdding new architectures to the TRANSPARENT_HUGEPAGE config option can\nmake the \"depends\" line rather ugly, like \"depends on (X86 || (S390 \u0026\u0026\n64BIT)) \u0026\u0026 MMU\".\n\nThis patch adds a HAVE_ARCH_TRANSPARENT_HUGEPAGE instead.  x86 already has\nMMU \"def_bool y\", so the MMU check is superfluous there and\nHAVE_ARCH_TRANSPARENT_HUGEPAGE can be selected in arch/x86/Kconfig.\n\nSigned-off-by: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: Ingo Molnar \u003cmingo@kernel.org\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.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": "ca42b26ab285edc5ee3f9faa48379d258db53c35",
      "tree": "4a9d68d4d730474dde75b1ffff106d7e3442aef1",
      "parents": [
        "227e4047488d3ee0173a914275a7fd207ad51e5b"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:30:01 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:28 2012 +0900"
      },
      "message": "mm: fix potential anon_vma locking issue in mprotect()\n\nFix an anon_vma locking issue in the following situation:\n\n- vma has no anon_vma\n- next has an anon_vma\n- vma is being shrunk / next is being expanded, due to an mprotect call\n\nWe need to take next\u0027s anon_vma lock to avoid races with rmap users (such\nas page migration) while next is being expanded.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: 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": "227e4047488d3ee0173a914275a7fd207ad51e5b",
      "tree": "399966ad453103c7a45caf52eee185749ccea796",
      "parents": [
        "17c230afa58a6d013a4949d5c04b823a281d40fa"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:59 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:28 2012 +0900"
      },
      "message": "thp: remove unnecessary set_recommended_min_free_kbytes\n\nSince it is called in start_khugepaged\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "17c230afa58a6d013a4949d5c04b823a281d40fa",
      "tree": "1e65372823340b6acebb6b9be26a68ba430bcff0",
      "parents": [
        "b7231789b0224e73af4efc7973f8bcf17fc16edd"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:56 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:28 2012 +0900"
      },
      "message": "thp: use khugepaged_enabled to remove duplicate code\n\nUse khugepaged_enabled to see whether thp is enabled\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "b7231789b0224e73af4efc7973f8bcf17fc16edd",
      "tree": "bc4234109f650f88d650a02211ca721dde673506",
      "parents": [
        "26234f36ef3ec7efcfa9acb181427849c1f9db7c"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:54 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:27 2012 +0900"
      },
      "message": "thp: remove khugepaged_loop\n\nMerge khugepaged_loop into khugepaged\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "26234f36ef3ec7efcfa9acb181427849c1f9db7c",
      "tree": "00c84ab6794fe54c75586eb211d75d80bb038646",
      "parents": [
        "420256ef02660af0acf28c12fe4b7d514ca88a4d"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:51 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:27 2012 +0900"
      },
      "message": "thp: introduce khugepaged_prealloc_page and khugepaged_alloc_page\n\nThey are used to abstract the difference between NUMA enabled and NUMA\ndisabled to make the code more readable\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "420256ef02660af0acf28c12fe4b7d514ca88a4d",
      "tree": "a2710b4d7b9983d084c59fb8c4a4df35be98d321",
      "parents": [
        "d516904bd239fe2c9f1bd46cf146bb4b8831321c"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:49 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:27 2012 +0900"
      },
      "message": "thp: release page in page pre-alloc path\n\nIf NUMA is enabled, we can release the page in the page pre-alloc\noperation, then the CONFIG_NUMA dependent code can be reduced\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "d516904bd239fe2c9f1bd46cf146bb4b8831321c",
      "tree": "de3ec1af9c309dba0faf2e662ba49f651a566e82",
      "parents": [
        "9817626e722a5e5699cf38f5d3a4c9851e054436"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:48 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:26 2012 +0900"
      },
      "message": "thp: merge page pre-alloc in khugepaged_loop into khugepaged_do_scan\n\nThere are two pre-alloc operations in these two function, the different is:\n- it allows to sleep if page alloc fail in khugepaged_loop\n- it exits immediately if page alloc fail in khugepaged_do_scan\n\nActually, in khugepaged_do_scan, we can allow the pre-alloc to sleep on\nthe first failure, then the operation in khugepaged_loop can be removed\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "9817626e722a5e5699cf38f5d3a4c9851e054436",
      "tree": "f8826ef7cf4182a963350d421991f2f3b26a30d9",
      "parents": [
        "2017c0bff8ba79ea527361adbe19471e174775d6"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:46 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:26 2012 +0900"
      },
      "message": "thp: remove some code depend on CONFIG_NUMA\n\nIf NUMA is disabled, hpage is used as page pre-alloc, so there are two\ncases for hpage:\n\n- it is !NULL, means the page is not consumed otherwise,\n- the page has been consumed\n\nIf NUMA is enabled, hpage is just used as alloc-fail indicator which is\nnot a real page, NULL means not fail triggered.\n\nSo, we can release the page only if !IS_ERR_OR_NULL\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "2017c0bff8ba79ea527361adbe19471e174775d6",
      "tree": "a5d6e611ac06180e19bc6a5a3189668259a99742",
      "parents": [
        "e060f0e0139b83f05bb90fa05563d14179b9a7ff"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:44 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:26 2012 +0900"
      },
      "message": "thp: remove wake_up_interruptible in the exit path\n\nAdd the check of kthread_should_stop() to the conditions which are used to\nwakeup on khugepaged_wait, then kthread_stop is enough to let the thread\nexit\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "e060f0e0139b83f05bb90fa05563d14179b9a7ff",
      "tree": "6da73af336dfc0f8456dbd3a55159aae32fe5c40",
      "parents": [
        "911891afe1c3104adf0f802189909868239ebbfd"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:42 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:26 2012 +0900"
      },
      "message": "thp: remove unnecessary khugepaged_thread check\n\nNow, khugepaged creation and cancel are completely serial under the\nprotection of khugepaged_mutex, it is impossible that many khugepaged\nentities are running\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "911891afe1c3104adf0f802189909868239ebbfd",
      "tree": "8583f33ded3ef14a85fe7cd2244c605ece673f37",
      "parents": [
        "637e3a27ec2c84f7ecd083fa6943da2f19eb5e9f"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:41 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:25 2012 +0900"
      },
      "message": "thp: move khugepaged_mutex out of khugepaged\n\nCurrently, hugepaged_mutex is used really complexly and hard to\nunderstand, actually, it is just used to serialize start_khugepaged and\nkhugepaged for these reasons:\n\n- khugepaged_thread is shared between them\n- the thp disable path (echo never \u003e transparent_hugepage/enabled) is\n  nonblocking, so we need to protect khugepaged_thread to get a stable\n  running state\n\nThese can be avoided by:\n\n- use the lock to serialize the thread creation and cancel\n- thp disable path can not finised until the thread exits\n\nThen khugepaged_thread is fully controlled by start_khugepaged, khugepaged\nwill be happy without the lock\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "637e3a27ec2c84f7ecd083fa6943da2f19eb5e9f",
      "tree": "9a90ab8b0ec8c21360f1a0e82a7d6a368099f423",
      "parents": [
        "65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:38 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:25 2012 +0900"
      },
      "message": "thp: remove unnecessary check in start_khugepaged\n\nThe check is unnecessary since if mm_slot_cache or mm_slots_hash\ninitialize failed, no sysfs interface will be created\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc",
      "tree": "f58f86178f2ce1998f80fc90717f3c2ae87551e6",
      "parents": [
        "db971418824381d3583c73751181fec76c743bf6"
      ],
      "author": {
        "name": "Xiao Guangrong",
        "email": "xiaoguangrong@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:35 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:25 2012 +0900"
      },
      "message": "thp: fix the count of THP_COLLAPSE_ALLOC\n\nTHP_COLLAPSE_ALLOC is double counted if NUMA is disabled since it has\nalready been calculated in khugepaged_alloc_hugepage\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@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": "db971418824381d3583c73751181fec76c743bf6",
      "tree": "ed06d4ab7de3ba8868a8696223dc2fc299e690be",
      "parents": [
        "5d3a551c28c6669dc43be40d8fafafbc2ec8f42b"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Mon Oct 08 16:29:34 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:24 2012 +0900"
      },
      "message": "mm: adjust final #endif position in mm/internal.h\n\nMake sure the #endif that terminates the standard #ifndef / #define /\n#endif construct gets labeled, and gets positioned at the end of the file\nas is normally the case.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@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": "5d3a551c28c6669dc43be40d8fafafbc2ec8f42b",
      "tree": "b3a9608ca6ab208d2c08e4fb4978037fe805764e",
      "parents": [
        "01dc52ebdf472f77cca623ca693ca24cfc0f1bbe"
      ],
      "author": {
        "name": "Will Deacon",
        "email": "will.deacon@arm.com",
        "time": "Mon Oct 08 16:29:32 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:24 2012 +0900"
      },
      "message": "mm: hugetlb: add arch hook for clearing page flags before entering pool\n\nThe core page allocator ensures that page flags are zeroed when freeing\npages via free_pages_check.  A number of architectures (ARM, PPC, MIPS)\nrely on this property to treat new pages as dirty with respect to the data\ncache and perform the appropriate flushing before mapping the pages into\nuserspace.\n\nThis can lead to cache synchronisation problems when using hugepages,\nsince the allocator keeps its own pool of pages above the usual page\nallocator and does not reset the page flags when freeing a page into the\npool.\n\nThis patch adds a new architecture hook, arch_clear_hugepage_flags, so\nthat architectures which rely on the page flags being in a particular\nstate for fresh allocations can adjust the flags accordingly when a page\nis freed into the pool.\n\nSigned-off-by: Will Deacon \u003cwill.deacon@arm.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "01dc52ebdf472f77cca623ca693ca24cfc0f1bbe",
      "tree": "2d0f35f2aff418d52a84fb50974ad3bacf68d4bd",
      "parents": [
        "d5dc0ad928fb9e972001e552597fd0b794863f34"
      ],
      "author": {
        "name": "Davidlohr Bueso",
        "email": "dave@gnu.org",
        "time": "Mon Oct 08 16:29:30 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:24 2012 +0900"
      },
      "message": "oom: remove deprecated oom_adj\n\nThe deprecated /proc/\u003cpid\u003e/oom_adj is scheduled for removal this month.\n\nSigned-off-by: Davidlohr Bueso \u003cdave@gnu.org\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: 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": "d5dc0ad928fb9e972001e552597fd0b794863f34",
      "tree": "14a08839b4b95c0a7eae66efe498382b4977a16a",
      "parents": [
        "e0f3c3f78da29b114e7c1c68019036559f715948"
      ],
      "author": {
        "name": "Gavin Shan",
        "email": "shangw@linux.vnet.ibm.com",
        "time": "Mon Oct 08 16:29:27 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:24 2012 +0900"
      },
      "message": "mm/vmscan: fix error number for failed kthread\n\nFix the return value while failing to create the kswapd kernel thread.\nAlso, the error message is prioritized as KERN_ERR.\n\nSigned-off-by: Gavin Shan \u003cshangw@linux.vnet.ibm.com\u003e\nSigned-off-by: Wanpeng Li \u003cliwanp@linux.vnet.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ],
  "next": "e0f3c3f78da29b114e7c1c68019036559f715948"
}
