)]}'
{
  "log": [
    {
      "commit": "64363aad5ff1b878230e91223038c26a2205bff3",
      "tree": "8f8bb770645e634d55fc390ec4428b1818eccd10",
      "parents": [
        "73b44ff43c4b3cf517826da03c51948593f88753"
      ],
      "author": {
        "name": "Joe Perches",
        "email": "joe@perches.com",
        "time": "Mon Jul 08 16:00:18 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 09 10:33:23 2013 -0700"
      },
      "message": "mm: remove unused VM_\u003cREADfoo\u003e macros and expand other in-place\n\nThese VM_\u003cREADfoo\u003e macros aren\u0027t used very often and three of them\naren\u0027t used at all.\n\nExpand the ones that are used in-place, and remove all the now unused\n#define VM_\u003cfoo\u003e macros.\n\nVM_READHINTMASK, VM_NormalReadHint and VM_ClearReadHint were added just\nbefore 2.4 and appears have never been used.\n\nSigned-off-by: Joe Perches \u003cjoe@perches.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": "1895418189e08c1d1eec4fbdb5fb41d793f57ba5",
      "tree": "43db8d2e00758e6ad3de06db3832986b4575c312",
      "parents": [
        "808c2c3745975714ecd4da4d68c915de9048b12f"
      ],
      "author": {
        "name": "Jiang Liu",
        "email": "liuj97@gmail.com",
        "time": "Wed Jul 03 15:04:21 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 03 16:07:38 2013 -0700"
      },
      "message": "mm: kill global variable num_physpages\n\nNow all references to num_physpages have been removed, so kill it.\n\nSigned-off-by: Jiang Liu \u003cjiang.liu@huawei.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Jiang Liu \u003cjiang.liu@huawei.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e6c495a96ce02574e765d5140039a64c8d4e8c9e",
      "tree": "0a1511f52ece251d786f02088b113b3f742a3b49",
      "parents": [
        "f60e2a968e2bebe34986f49251017f72b725d8c0"
      ],
      "author": {
        "name": "Vineet Gupta",
        "email": "Vineet.Gupta1@synopsys.com",
        "time": "Wed Jul 03 15:03:31 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 03 16:07:34 2013 -0700"
      },
      "message": "mm: fix the TLB range flushed when __tlb_remove_page() runs out of slots\n\nzap_pte_range loops from @addr to @end.  In the middle, if it runs out of\nbatching slots, TLB entries needs to be flushed for @start to @interim,\nNOT @interim to @end.\n\nSince ARC port doesn\u0027t use page free batching I can\u0027t test it myself but\nthis seems like the right thing to do.\n\nObserved this when working on a fix for the issue at thread:\nhttp://www.spinics.net/lists/linux-arch/msg21736.html\n\nSigned-off-by: Vineet Gupta \u003cvgupta@synopsys.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nAcked-by: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nCc: Max Filippov \u003cjcmvbkbc@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": "d6e932177090463e5c709e9e61bbd705a33a1609",
      "tree": "e833b8907a9c07662c5aaaef097a81575ba27653",
      "parents": [
        "b430e9d1c6d416306d44dbf3aa3148be7af78abc"
      ],
      "author": {
        "name": "Libin",
        "email": "huawei.libin@huawei.com",
        "time": "Wed Jul 03 15:01:26 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jul 03 16:07:26 2013 -0700"
      },
      "message": "mm: use vma_pages() to replace (vm_end - vm_start) \u003e\u003e PAGE_SHIFT\n\n(*-\u003evm_end - *-\u003evm_start) \u003e\u003e PAGE_SHIFT operation is implemented\nas a inline funcion vma_pages() in linux/mm.h, so using it.\n\nSigned-off-by: Libin \u003chuawei.libin@huawei.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e13053f50664d3d614bbc9b8c83abdad979ac7c9",
      "tree": "07ee41cd50ba26bd7ec92255184f80aff70a2e9a",
      "parents": [
        "2d722f6d5671794c0de0e29e3da75006ac086718",
        "662bbcb2747c2422cf98d3d97619509379eee466"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 02 16:19:24 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 02 16:19:24 2013 -0700"
      },
      "message": "Merge branch \u0027sched-mm-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip\n\nPull voluntary preemption fixes from Ingo Molnar:\n \"This tree contains a speedup which is achieved through better\n  might_sleep()/might_fault() preemption point annotations for uaccess\n  functions, by Michael S Tsirkin:\n\n  1. The only reason uaccess routines might sleep is if they fault.\n     Make this explicit for all architectures.\n\n  2. A voluntary preemption point in uaccess functions means compiler\n     can\u0027t inline them efficiently, this breaks assumptions that they\n     are very fast and small that e.g.  net code seems to make.  Remove\n     this preemption point so behaviour matches with what callers\n     assume.\n\n  3. Accesses (e.g through socket ops) to kernel memory with KERNEL_DS\n     like net/sunrpc does will never sleep.  Remove an unconditinal\n     might_sleep() in the might_fault() inline in kernel.h (used when\n     PROVE_LOCKING is not set).\n\n  4. Accesses with pagefault_disable() return EFAULT but won\u0027t cause\n     caller to sleep.  Check for that and thus avoid might_sleep() when\n     PROVE_LOCKING is set.\n\n  These changes offer a nice speedup for CONFIG_PREEMPT_VOLUNTARY\u003dy\n  kernels, here\u0027s a network bandwidth measurement between a virtual\n  machine and the host:\n\n   before:\n        incoming: 7122.77   Mb/s\n        outgoing: 8480.37   Mb/s\n\n   after:\n        incoming: 8619.24   Mb/s   [ +21.0% ]\n        outgoing: 9455.42   Mb/s   [ +11.5% ]\n\n  I kept these changes in a separate tree, separate from scheduler\n  changes, because it\u0027s a mixed MM and scheduler topic\"\n\n* \u0027sched-mm-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:\n  mm, sched: Allow uaccess in atomic with pagefault_disable()\n  mm, sched: Drop voluntary schedule from might_fault()\n  x86: uaccess s/might_sleep/might_fault/\n  tile: uaccess s/might_sleep/might_fault/\n  powerpc: uaccess s/might_sleep/might_fault/\n  mn10300: uaccess s/might_sleep/might_fault/\n  microblaze: uaccess s/might_sleep/might_fault/\n  m32r: uaccess s/might_sleep/might_fault/\n  frv: uaccess s/might_sleep/might_fault/\n  arm64: uaccess s/might_sleep/might_fault/\n  asm-generic: uaccess s/might_sleep/might_fault/\n"
    },
    {
      "commit": "29eb77825cc7da8d45b642de2de3d423dc8a363f",
      "tree": "689c3c9f8b34f8023899ba8c230ea04c4dc21e54",
      "parents": [
        "2c95523c0f0ca7c2f157a07f0c03b6bbba13fee6"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "peterz@infradead.org",
        "time": "Wed Jun 05 12:26:50 2013 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jun 06 10:07:26 2013 +0900"
      },
      "message": "arch, mm: Remove tlb_fast_mode()\n\nSince the introduction of preemptible mmu_gather TLB fast mode has been\nbroken. TLB fast mode relies on there being absolutely no concurrency;\nit frees pages first and invalidates TLBs later.\n\nHowever now we can get concurrency and stuff goes *bang*.\n\nThis patch removes all tlb_fast_mode() code; it was found the better\noption vs trying to patch the hole by entangling tlb invalidation with\nthe scheduler.\n\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Russell King \u003clinux@arm.linux.org.uk\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nReported-by: Max Filippov \u003cjcmvbkbc@gmail.com\u003e\nSigned-off-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "662bbcb2747c2422cf98d3d97619509379eee466",
      "tree": "d733c7257e59bde654d963cce0e26454a134d787",
      "parents": [
        "114276ac0a3beb9c391a410349bd770653e185ce"
      ],
      "author": {
        "name": "Michael S. Tsirkin",
        "email": "mst@redhat.com",
        "time": "Sun May 26 17:32:23 2013 +0300"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Tue May 28 09:41:11 2013 +0200"
      },
      "message": "mm, sched: Allow uaccess in atomic with pagefault_disable()\n\nThis changes might_fault() so that it does not\ntrigger a false positive diagnostic for e.g. the following\nsequence:\n\n\tspin_lock_irqsave()\n\tpagefault_disable()\n\tcopy_to_user()\n\tpagefault_enable()\n\tspin_unlock_irqrestore()\n\nIn particular vhost wants to do this, to call\nsocket ops from under a lock.\n\nThere are 3 cases to consider:\n\n - CONFIG_PROVE_LOCKING - might_fault is non-inline\n   so it\u0027s easy to move the in_atomic test to fix\n   up the false positive warning.\n\n - CONFIG_DEBUG_ATOMIC_SLEEP - might_fault\n   is currently inline, but we are calling a\n   non-inline __might_sleep anyway,\n   so let\u0027s use the non-line version of might_fault\n   that does the right thing.\n\n - !CONFIG_DEBUG_ATOMIC_SLEEP \u0026\u0026 !CONFIG_PROVE_LOCKING\n   __might_sleep is a nop so might_fault is a nop.\n\nMake this explicit.\n\nSigned-off-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nSigned-off-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nLink: http://lkml.kernel.org/r/1369577426-26721-11-git-send-email-mst@redhat.com\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "114276ac0a3beb9c391a410349bd770653e185ce",
      "tree": "d5bfaac722054c5a576647edf8642058fae298a7",
      "parents": [
        "016be2e55d98aee0b97b94b200d6e0e110c8392a"
      ],
      "author": {
        "name": "Michael S. Tsirkin",
        "email": "mst@redhat.com",
        "time": "Sun May 26 17:32:13 2013 +0300"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Tue May 28 09:41:11 2013 +0200"
      },
      "message": "mm, sched: Drop voluntary schedule from might_fault()\n\nmight_fault() is called from functions like copy_to_user()\nwhich most callers expect to be very fast, like a couple of\ninstructions.\n\nSo functions like memcpy_toiovec() call them many times in a loop.\n\nBut might_fault() calls might_sleep() and with CONFIG_PREEMPT_VOLUNTARY\nthis results in a function call.\n\nLet\u0027s not do this - just call __might_sleep() that produces\na diagnostic for sleep within atomic, but drop\nmight_preempt().\n\nHere\u0027s a test sending traffic between the VM and the host,\nhost is built with CONFIG_PREEMPT_VOLUNTARY:\n\n before:\n\tincoming: 7122.77   Mb/s\n\toutgoing: 8480.37   Mb/s\n\n after:\n\tincoming: 8619.24   Mb/s\n\toutgoing: 9455.42   Mb/s\n\nAs a side effect, this fixes an issue pointed\nout by Ingo: might_fault might schedule differently\ndepending on PROVE_LOCKING. Now there\u0027s no\npreemption point in both cases, so it\u0027s consistent.\n\nSigned-off-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nSigned-off-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nLink: http://lkml.kernel.org/r/1369577426-26721-10-git-send-email-mst@redhat.com\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "5d434fcb255dec99189f1c58a06e4f56e12bf77d",
      "tree": "734289dc85074903d9e636a935d43414746e222c",
      "parents": [
        "5a5a1bf099d6942399ea0b34a62e5f0bc4c5c36e",
        "071361d3473ebb8142907470ff12d59c59f6be72"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Apr 30 09:36:50 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Apr 30 09:36:50 2013 -0700"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial\n\nPull trivial tree updates from Jiri Kosina:\n \"Usual stuff, mostly comment fixes, typo fixes, printk fixes and small\n  code cleanups\"\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)\n  mm: Convert print_symbol to %pSR\n  gfs2: Convert print_symbol to %pSR\n  m32r: Convert print_symbol to %pSR\n  iostats.txt: add easy-to-find description for field 6\n  x86 cmpxchg.h: fix wrong comment\n  treewide: Fix typo in printk and comments\n  doc: devicetree: Fix various typos\n  docbook: fix 8250 naming in device-drivers\n  pata_pdc2027x: Fix compiler warning\n  treewide: Fix typo in printks\n  mei: Fix comments in drivers/misc/mei\n  treewide: Fix typos in kernel messages\n  pm44xx: Fix comment for \"CONFIG_CPU_IDLE\"\n  doc: Fix typo \"CONFIG_CGROUP_CGROUP_MEMCG_SWAP\"\n  mmzone: correct \"pags\" to \"pages\" in comment.\n  kernel-parameters: remove outdated \u0027noresidual\u0027 parameter\n  Remove spurious _H suffixes from ifdef comments\n  sound: Remove stray pluses from Kconfig file\n  radio-shark: Fix printk \"CONFIG_LED_CLASS\"\n  doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE\n  ...\n"
    },
    {
      "commit": "52f37629fd3c7b24e1e6c125e665454cd7ac1acb",
      "tree": "8dd4a3b22cbb4d89f2b7e686189e8ced3319dcea",
      "parents": [
        "f1cb08798e2497238b28f377bd131426f0b9835d"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan@kernel.org",
        "time": "Mon Apr 29 15:08:15 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Apr 29 15:54:37 2013 -0700"
      },
      "message": "THP: fix comment about memory barrier\n\nCurrently the memory barrier in __do_huge_pmd_anonymous_page doesn\u0027t\nwork.  Because lru_cache_add_lru uses pagevec so it could miss spinlock\neasily so above rule was broken so user might see inconsistent data.\n\nI was not first person who pointed out the problem.  Mel and Peter\npointed out a few months ago and Peter pointed out further that even\nspin_lock/unlock can\u0027t make sure of it:\n\n  http://marc.info/?t\u003d134333512700004\n\n\tIn particular:\n\n        \t*A \u003d a;\n        \tLOCK\n        \tUNLOCK\n        \t*B \u003d b;\n\n\tmay occur as:\n\n        \tLOCK, STORE *B, STORE *A, UNLOCK\n\nAt last, Hugh pointed out that even we don\u0027t need memory barrier in\nthere because __SetPageUpdate already have done it from Nick\u0027s commit\n0ed361dec369 (\"mm: fix PageUptodate data race\") explicitly.\n\nSo this patch fixes comment on THP and adds same comment for\ndo_anonymous_page, too because everybody except Hugh was missing that.\nIt means we need a comment about that.\n\nSigned-off-by: Minchan Kim \u003cminchan@kernel.org\u003e\nAcked-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "071361d3473ebb8142907470ff12d59c59f6be72",
      "tree": "cebdd2bd5cf478c86c1d113f358267a42b0c4413",
      "parents": [
        "7af584d3b0e0ba025562198e6bfbff3c0fe1f17e"
      ],
      "author": {
        "name": "Joe Perches",
        "email": "joe@perches.com",
        "time": "Wed Dec 12 10:19:12 2012 -0800"
      },
      "committer": {
        "name": "Jiri Kosina",
        "email": "jkosina@suse.cz",
        "time": "Mon Apr 29 15:24:33 2013 +0200"
      },
      "message": "mm: Convert print_symbol to %pSR\n\nUse the new vsprintf extension to avoid any possible\nmessage interleaving.\n\nSigned-off-by: Joe Perches \u003cjoe@perches.com\u003e\nAcked-by: Christoph Lameter \u003ccl@linux.com\u003e\nSigned-off-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\n"
    },
    {
      "commit": "b4cbb197c7e7a68dbad0d491242e3ca67420c13e",
      "tree": "7837f65dc0b03d8e84ed5aa6af02bc26e5a210f1",
      "parents": [
        "bb33db7a076f4719dc68c235e187dd4bfb16b621"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Apr 16 13:45:37 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Apr 16 16:45:45 2013 -0700"
      },
      "message": "vm: add vm_iomap_memory() helper function\n\nVarious drivers end up replicating the code to mmap() their memory\nbuffers into user space, and our core memory remapping function may be\nvery flexible but it is unnecessarily complicated for the common cases\nto use.\n\nOur internal VM uses pfn\u0027s (\"page frame numbers\") which simplifies\nthings for the VM, and allows us to pass physical addresses around in a\ndenser and more efficient format than passing a \"phys_addr_t\" around,\nand having to shift it up and down by the page size.  But it just means\nthat drivers end up doing that shifting instead at the interface level.\n\nIt also means that drivers end up mucking around with internal VM things\nlike the vma details (vm_pgoff, vm_start/end) way more than they really\nneed to.\n\nSo this just exports a function to map a certain physical memory range\ninto user space (using a phys_addr_t based interface that is much more\nnatural for a driver) and hides all the complexity from the driver.\nSome drivers will still end up tweaking the vm_page_prot details for\nthings like prefetching or cacheability etc, but that\u0027s actually\nrelevant to the driver, rather than caring about what the page offset of\nthe mapping is into the particular IO memory region.\n\nAcked-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1de14c3c5cbc9bb17e9dcc648cda51c0c85d54b9",
      "tree": "ab6010ad78195651c39a8ca3829ba1b95451762f",
      "parents": [
        "bf81710c4b6e2df2cc047f7c8e1f342511904b74"
      ],
      "author": {
        "name": "Dave Hansen",
        "email": "dave@sr71.net",
        "time": "Fri Apr 12 16:23:54 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Apr 12 16:56:47 2013 -0700"
      },
      "message": "x86-32: Fix possible incomplete TLB invalidate with PAE pagetables\n\nThis patch attempts to fix:\n\n\thttps://bugzilla.kernel.org/show_bug.cgi?id\u003d56461\n\nThe symptom is a crash and messages like this:\n\n\tchrome: Corrupted page table at address 34a03000\n\t*pdpt \u003d 0000000000000000 *pde \u003d 0000000000000000\n\tBad pagetable: 000f [#1] PREEMPT SMP\n\nIngo guesses this got introduced by commit 611ae8e3f520 (\"x86/tlb:\nenable tlb flush range support for x86\") since that code started to free\nunused pagetables.\n\nOn x86-32 PAE kernels, that new code has the potential to free an entire\nPMD page and will clear one of the four page-directory-pointer-table\n(aka pgd_t entries).\n\nThe hardware aggressively \"caches\" these top-level entries and invlpg\ndoes not actually affect the CPU\u0027s copy.  If we clear one we *HAVE* to\ndo a full TLB flush, otherwise we might continue using a freed pmd page.\n(note, we do this properly on the population side in pud_populate()).\n\nThis patch tracks whenever we clear one of these entries in the \u0027struct\nmmu_gather\u0027, and ensures that we follow up with a full tlb flush.\n\nBTW, I disassembled and checked that:\n\n\tif (tlb-\u003efullmm \u003d\u003d 0)\nand\n\tif (!tlb-\u003efullmm \u0026\u0026 !tlb-\u003eneed_flush_all)\n\ngenerate essentially the same code, so there should be zero impact there\nto the !PAE case.\n\nSigned-off-by: Dave Hansen \u003cdave.hansen@linux.intel.com\u003e\nCc: Peter Anvin \u003chpa@zytor.com\u003e\nCc: Ingo Molnar \u003cmingo@kernel.org\u003e\nCc: Artem S Tashkinov \u003ct.artem@mailcity.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9043a2650cd21f96f831a97f516c2c302e21fb70",
      "tree": "926720afb0acc7bad8cfcae537dc58de552f9249",
      "parents": [
        "ab7826595e9ec51a51f622c5fc91e2f59440481a",
        "d9d8d7ed498ec65bea72dd24be7b9cd35af0c200"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Feb 25 15:41:43 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Feb 25 15:41:43 2013 -0800"
      },
      "message": "Merge tag \u0027modules-next-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux\n\nPull module update from Rusty Russell:\n \"The sweeping change is to make add_taint() explicitly indicate whether\n  to disable lockdep, but it\u0027s a mechanical change.\"\n\n* tag \u0027modules-next-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:\n  MODSIGN: Add option to not sign modules during modules_install\n  MODSIGN: Add -s \u003csignature\u003e option to sign-file\n  MODSIGN: Specify the hash algorithm on sign-file command line\n  MODSIGN: Simplify Makefile with a Kconfig helper\n  module: clean up load_module a little more.\n  modpost: Ignore ARC specific non-alloc sections\n  module: constify within_module_*\n  taint: add explicit flag to show whether lock dep is still OK.\n  module: printk message when module signature fail taints kernel.\n"
    },
    {
      "commit": "56f31801ccdecb420d0d1fd2bf9f337c355214a9",
      "tree": "868442b02e6c83bdd52e4e129b17b90341190b6d",
      "parents": [
        "9e16b7fb1d066d38d01fd57c449f2640c5d208cb"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Fri Feb 22 16:36:10 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:24 2013 -0800"
      },
      "message": "mm: cleanup \"swapcache\" in do_swap_page\n\nI dislike the way in which \"swapcache\" gets used in do_swap_page():\nthere is always a page from swapcache there (even if maybe uncached by\nthe time we lock it), but tests are made according to \"swapcache\".\nRework that with \"page !\u003d swapcache\", as has been done in unuse_pte().\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Petr Holasek \u003cpholasek@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Izik Eidus \u003cizik.eidus@ravellosystems.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5117b3b835f288314a2d4e5512bc1747e3a7c8ed",
      "tree": "c4267d11de7bff025bf15c3557bfa65c346bad38",
      "parents": [
        "bc56620b493496b8a6962080b644ccc537f4d526"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Fri Feb 22 16:36:07 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:23 2013 -0800"
      },
      "message": "mm,ksm: FOLL_MIGRATION do migration_entry_wait\n\nIn \"ksm: remove old stable nodes more thoroughly\" I said that I\u0027d never\nseen its WARN_ON_ONCE(page_mapped(page)).  True at the time of writing,\nbut it soon appeared once I tried fuller tests on the whole series.\n\nIt turned out to be due to the KSM page migration itself: unmerge_and_\nremove_all_rmap_items() failed to locate and replace all the KSM pages,\nbecause of that hiatus in page migration when old pte has been replaced\nby migration entry, but not yet by new pte.  follow_page() finds no page\nat that instant, but a KSM page reappears shortly after, without a\nfault.\n\nAdd FOLL_MIGRATION flag, so follow_page() can do migration_entry_wait()\nfor KSM\u0027s break_cow().  I\u0027d have preferred to avoid another flag, and do\nit every time, in case someone else makes the same easy mistake; but did\nnot find another transgressor (the common get_user_pages() is of course\nsafe), and cannot be sure that every follow_page() caller is prepared to\nsleep - ia64\u0027s xencomm_vtop()? Now, THP\u0027s wait_split_huge_page() can\nalready sleep there, since anon_vma locking was changed to mutex, but\nmaybe that\u0027s somehow excluded.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Petr Holasek \u003cpholasek@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Izik Eidus \u003cizik.eidus@ravellosystems.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "240aadeedc4a89fc44623f8ce4ca46bda73db07e",
      "tree": "e12cc254f2e78560837e5d454fdbe9b5d9e05c5c",
      "parents": [
        "28a35716d317980ae9bc2ff2f84c33a3cda9e884"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Fri Feb 22 16:35:56 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:23 2013 -0800"
      },
      "message": "mm: accelerate mm_populate() treatment of THP pages\n\nThis change adds a follow_page_mask function which is equivalent to\nfollow_page, but with an extra page_mask argument.\n\nfollow_page_mask sets *page_mask to HPAGE_PMD_NR - 1 when it encounters\na THP page, and to 0 in other cases.\n\n__get_user_pages() makes use of this in order to accelerate populating\nTHP ranges - that is, when both the pages and vmas arrays are NULL, we\ndon\u0027t need to iterate HPAGE_PMD_NR times to cover a single THP page (and\nwe also avoid taking mm-\u003epage_table_lock that many times).\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: 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": "28a35716d317980ae9bc2ff2f84c33a3cda9e884",
      "tree": "a69307192d34334c6869cfe33b6fea4e358de718",
      "parents": [
        "e0fb58152955142f48ed31c8c0541b53e094da6b"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Fri Feb 22 16:35:55 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:22 2013 -0800"
      },
      "message": "mm: use long type for page counts in mm_populate() and get_user_pages()\n\nUse long type for page counts in mm_populate() so as to avoid integer\noverflow when running the following test code:\n\nint main(void) {\n  void *p \u003d mmap(NULL, 0x100000000000, PROT_READ,\n                 MAP_PRIVATE | MAP_ANON, -1, 0);\n  printf(\"p: %p\\n\", p);\n  mlockall(MCL_CURRENT);\n  printf(\"done\\n\");\n  return 0;\n}\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: 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": "cbf86cfe04a66471f23b9e62e5eba4e525f38855",
      "tree": "5572b238db52f238e3291354a4bba161f4495627",
      "parents": [
        "8aafa6a485ae77ce4a49eb1280f3d2c6074a03fb"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Fri Feb 22 16:35:08 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:19 2013 -0800"
      },
      "message": "ksm: remove old stable nodes more thoroughly\n\nSwitching merge_across_nodes after running KSM is liable to oops on stale\nnodes still left over from the previous stable tree.  It\u0027s not something\nthat people will often want to do, but it would be lame to demand a reboot\nwhen they\u0027re trying to determine which merge_across_nodes setting is best.\n\nHow can this happen?  We only permit switching merge_across_nodes when\npages_shared is 0, and usually set run 2 to force that beforehand, which\nought to unmerge everything: yet oopses still occur when you then run 1.\n\nThree causes:\n\n1. The old stable tree (built according to the inverse\n   merge_across_nodes) has not been fully torn down.  A stable node\n   lingers until get_ksm_page() notices that the page it references no\n   longer references it: but the page is not necessarily freed as soon as\n   expected, particularly when swapcache.\n\n   Fix this with a pass through the old stable tree, applying\n   get_ksm_page() to each of the remaining nodes (most found stale and\n   removed immediately), with forced removal of any left over.  Unless the\n   page is still mapped: I\u0027ve not seen that case, it shouldn\u0027t occur, but\n   better to WARN_ON_ONCE and EBUSY than BUG.\n\n2. __ksm_enter() has a nice little optimization, to insert the new mm\n   just behind ksmd\u0027s cursor, so there\u0027s a full pass for it to stabilize\n   (or be removed) before ksmd addresses it.  Nice when ksmd is running,\n   but not so nice when we\u0027re trying to unmerge all mms: we were missing\n   those mms forked and inserted behind the unmerge cursor.  Easily fixed\n   by inserting at the end when KSM_RUN_UNMERGE.\n\n3.  It is possible for a KSM page to be faulted back from swapcache\n   into an mm, just after unmerge_and_remove_all_rmap_items() scanned past\n   it.  Fix this by copying on fault when KSM_RUN_UNMERGE: but that is\n   private to ksm.c, so dissolve the distinction between\n   ksm_might_need_to_copy() and ksm_does_need_to_copy(), doing it all in\n   the one call into ksm.c.\n\nA long outstanding, unrelated bugfix sneaks in with that third fix:\nksm_does_need_to_copy() would copy from a !PageUptodate page (implying I/O\nerror when read in from swap) to a page which it then marks Uptodate.  Fix\nthis case by not copying, letting do_swap_page() discover the error.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Petr Holasek \u003cpholasek@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Izik Eidus \u003cizik.eidus@ravellosystems.com\u003e\nCc: Gerald Schaefer \u003cgerald.schaefer@de.ibm.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@gmail.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "75980e97daccfc6babbac7e180ff118537955f5d",
      "tree": "b5721bae11eab21a8ee7c2ba4c7f153a59766dd6",
      "parents": [
        "bbeae5b05ef6e40bf54db05ceb8635824153b9e2"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Fri Feb 22 16:34:32 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:17 2013 -0800"
      },
      "message": "mm: fold page-\u003e_last_nid into page-\u003eflags where possible\n\npage-\u003e_last_nid fits into page-\u003eflags on 64-bit.  The unlikely 32-bit\nNUMA configuration with NUMA Balancing will still need an extra page\nfield.  As Peter notes \"Completely dropping 32bit support for\nCONFIG_NUMA_BALANCING would simplify things, but it would also remove\nthe warning if we grow enough 64bit only page-flags to push the last-cpu\nout.\"\n\n[mgorman@suse.de: minor modifications]\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Ingo Molnar \u003cmingo@kernel.org\u003e\nCc: Simon Jeons \u003csimon.jeons@gmail.com\u003e\nCc: Wanpeng Li \u003cliwanp@linux.vnet.ibm.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": "cea10a19b7972a1954c4a2d05a7de8db48b444fb",
      "tree": "694b3c906259cfbfc7b7cb1b0eb507ecf0d1d63c",
      "parents": [
        "c22c0d6344c362b1dde5d8e160d3d07536aca120"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Fri Feb 22 16:32:44 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:11 2013 -0800"
      },
      "message": "mm: directly use __mlock_vma_pages_range() in find_extend_vma()\n\nIn find_extend_vma(), we don\u0027t need mlock_vma_pages_range() to verify\nthe vma type - we know we\u0027re working with a stack.  So, we can call\ndirectly into __mlock_vma_pages_range(), and remove the last\nmake_pages_present() call site.\n\nNote that we don\u0027t use mm_populate() here, so we can\u0027t release the\nmmap_sem while allocating new stack pages.  This is deemed acceptable,\nbecause the stack vmas grow by a bounded number of pages at a time, and\nthese are anon pages so we don\u0027t have to read from disk to populate\nthem.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nTested-by: Andy Lutomirski \u003cluto@amacapital.net\u003e\nCc: Greg Ungerer \u003cgregungerer@westnet.com.au\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "af34770e55fd899c96d8d73bdc04dbc956096650",
      "tree": "91c9bfc79d765a7919412a2ab73a164c96d05706",
      "parents": [
        "9b4f98cdac9683ee9cdb28c582a81223f0c10a3f"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Fri Feb 22 16:32:20 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sat Feb 23 17:50:09 2013 -0800"
      },
      "message": "mm: reduce rmap overhead for ex-KSM page copies created on swap faults\n\nWhen ex-KSM pages are faulted from swap cache, the fault handler is not\ncapable of re-establishing anon_vma-spanning KSM pages.  In this case, a\ncopy of the page is created instead, just like during a COW break.\n\nThese freshly made copies are known to be exclusive to the faulting VMA\nand there is no reason to go look for this page in parent and sibling\nprocesses during rmap operations.\n\nUse page_add_new_anon_rmap() for these copies.  This also puts them on\nthe proper LRU lists and marks them SwapBacked, so we can get rid of\ndoing this ad-hoc in the KSM copy code.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Simon Jeons \u003csimon.jeons@gmail.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Satoru Moriya \u003csatoru.moriya@hds.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "373d4d099761cb1f637bed488ab3871945882273",
      "tree": "954bef7bc724aee105dd246d5f2b1ea04ed38b20",
      "parents": [
        "64748a2c9062da0c32b59c1b368a86fc4613b1e1"
      ],
      "author": {
        "name": "Rusty Russell",
        "email": "rusty@rustcorp.com.au",
        "time": "Mon Jan 21 17:17:39 2013 +1030"
      },
      "committer": {
        "name": "Rusty Russell",
        "email": "rusty@rustcorp.com.au",
        "time": "Mon Jan 21 17:17:57 2013 +1030"
      },
      "message": "taint: add explicit flag to show whether lock dep is still OK.\n\nFix up all callers as they were before, with make one change: an\nunsigned module taints the kernel, but doesn\u0027t turn off lockdep.\n\nSigned-off-by: Rusty Russell \u003crusty@rustcorp.com.au\u003e\n"
    },
    {
      "commit": "e53289c0c5e5a24e29e571eba7af05c845c10890",
      "tree": "fd8852edc6b91152f30b8a7eb0e75fc5ca6750af",
      "parents": [
        "08c097fc3bb283299a6915a6a3795edab85979b1"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jan 09 08:36:54 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jan 09 08:36:54 2013 -0800"
      },
      "message": "mm: reinstante dropped pmd_trans_splitting() check\n\nThe check for a pmd being in the process of being split was dropped by\nmistake by commit d10e63f29488 (\"mm: numa: Create basic numa page\nhinting infrastructure\"). Put it back.\n\nReported-by: Dave Jones \u003cdavej@redhat.com\u003e\nDebugged-by: Hillf Danton \u003cdhillf@gmail.com\u003e\nAcked-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Kirill Shutemov \u003ckirill@shutemov.name\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "53a59fc67f97374758e63a9c785891ec62324c81",
      "tree": "a3c0310be75a9cbb26e8b5dd37b4e86fba48a035",
      "parents": [
        "a458431e176ddb27e8ef8b98c2a681b217337393"
      ],
      "author": {
        "name": "Michal Hocko",
        "email": "mhocko@suse.cz",
        "time": "Fri Jan 04 15:35:12 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jan 04 16:11:46 2013 -0800"
      },
      "message": "mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT\n\nSince commit e303297e6c3a (\"mm: extended batches for generic\nmmu_gather\") we are batching pages to be freed until either\ntlb_next_batch cannot allocate a new batch or we are done.\n\nThis works just fine most of the time but we can get in troubles with\nnon-preemptible kernel (CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY)\non large machines where too aggressive batching might lead to soft\nlockups during process exit path (exit_mmap) because there are no\nscheduling points down the free_pages_and_swap_cache path and so the\nfreeing can take long enough to trigger the soft lockup.\n\nThe lockup is harmless except when the system is setup to panic on\nsoftlockup which is not that unusual.\n\nThe simplest way to work around this issue is to limit the maximum\nnumber of batches in a single mmu_gather.  10k of collected pages should\nbe safe to prevent from soft lockups (we would have 2ms for one) even if\nthey are all freed without an explicit scheduling point.\n\nThis patch doesn\u0027t add any new explicit scheduling points because it\nrelies on zap_pmd_range during page tables zapping which calls\ncond_resched per PMD.\n\nThe following lockup has been reported for 3.0 kernel with a huge\nprocess (in order of hundreds gigs but I do know any more details).\n\n  BUG: soft lockup - CPU#56 stuck for 22s! [kernel:31053]\n  Modules linked in: af_packet nfs lockd fscache auth_rpcgss nfs_acl sunrpc mptctl mptbase autofs4 binfmt_misc dm_round_robin dm_multipath bonding cpufreq_conservative cpufreq_userspace cpufreq_powersave pcc_cpufreq mperf microcode fuse loop osst sg sd_mod crc_t10dif st qla2xxx scsi_transport_fc scsi_tgt netxen_nic i7core_edac iTCO_wdt joydev e1000e serio_raw pcspkr edac_core iTCO_vendor_support acpi_power_meter rtc_cmos hpwdt hpilo button container usbhid hid dm_mirror dm_region_hash dm_log linear uhci_hcd ehci_hcd usbcore usb_common scsi_dh_emc scsi_dh_alua scsi_dh_hp_sw scsi_dh_rdac scsi_dh dm_snapshot pcnet32 mii edd dm_mod raid1 ext3 mbcache jbd fan thermal processor thermal_sys hwmon cciss scsi_mod\n  Supported: Yes\n  CPU 56\n  Pid: 31053, comm: kernel Not tainted 3.0.31-0.9-default #1 HP ProLiant DL580 G7\n  RIP: 0010:  _raw_spin_unlock_irqrestore+0x8/0x10\n  RSP: 0018:ffff883ec1037af0  EFLAGS: 00000206\n  RAX: 0000000000000e00 RBX: ffffea01a0817e28 RCX: ffff88803ffd9e80\n  RDX: 0000000000000200 RSI: 0000000000000206 RDI: 0000000000000206\n  RBP: 0000000000000002 R08: 0000000000000001 R09: ffff887ec724a400\n  R10: 0000000000000000 R11: dead000000200200 R12: ffffffff8144c26e\n  R13: 0000000000000030 R14: 0000000000000297 R15: 000000000000000e\n  FS:  00007ed834282700(0000) GS:ffff88c03f200000(0000) knlGS:0000000000000000\n  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n  CR2: 000000000068b240 CR3: 0000003ec13c5000 CR4: 00000000000006e0\n  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n  Process kernel (pid: 31053, threadinfo ffff883ec1036000, task ffff883ebd5d4100)\n  Call Trace:\n    release_pages+0xc5/0x260\n    free_pages_and_swap_cache+0x9d/0xc0\n    tlb_flush_mmu+0x5c/0x80\n    tlb_finish_mmu+0xe/0x50\n    exit_mmap+0xbd/0x120\n    mmput+0x49/0x120\n    exit_mm+0x122/0x160\n    do_exit+0x17a/0x430\n    do_group_exit+0x3d/0xb0\n    get_signal_to_deliver+0x247/0x480\n    do_signal+0x71/0x1b0\n    do_notify_resume+0x98/0xb0\n    int_signal+0x12/0x17\n  DWARF2 unwinder stuck at int_signal+0x12/0x17\n\nSigned-off-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: \u003cstable@vger.kernel.org\u003e\t[3.0+]\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2fbc57c53a815ea30b926dd7627897a02daae302",
      "tree": "0e2ed68c2b93e6d0d28a1f7c7a328e014a523fb5",
      "parents": [
        "35367ab28d024ef026dbd797b4076c8f008ec08c"
      ],
      "author": {
        "name": "Andy Shevchenko",
        "email": "andriy.shevchenko@linux.intel.com",
        "time": "Mon Dec 17 16:01:23 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Dec 17 17:15:17 2012 -0800"
      },
      "message": "mm: use kbasename()\n\nSigned-off-by: Andy Shevchenko \u003candriy.shevchenko@linux.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": "b3dd20709db2cab0da0ade1f246fd6e6ab1396eb",
      "tree": "f0115494a35ec2179471c8aa87262ef4b9b9da1c",
      "parents": [
        "d7124073add4cd04508f9ae3adc2746c61d7e78b"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Mon Dec 17 15:59:24 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Dec 17 17:15:12 2012 -0800"
      },
      "message": "mm/memory.c: suppress warning\n\ngcc-4.4.4 screws this up.\n\n  mm/memory.c: In function \u0027do_pmd_numa_page\u0027:\n  mm/memory.c:3594: warning: no return statement in function returning non-void\n\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3d59eebc5e137bd89c6351e4c70e90ba1d0dc234",
      "tree": "b4ddfd0b057454a7437a3b4e3074a3b8b4b03817",
      "parents": [
        "11520e5e7c1855fc3bf202bb3be35a39d9efa034",
        "4fc3f1d66b1ef0d7b8dc11f4ff1cc510f78b37d6"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Dec 16 14:33:25 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Dec 16 15:18:08 2012 -0800"
      },
      "message": "Merge tag \u0027balancenuma-v11\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mel/linux-balancenuma\n\nPull Automatic NUMA Balancing bare-bones from Mel Gorman:\n \"There are three implementations for NUMA balancing, this tree\n  (balancenuma), numacore which has been developed in tip/master and\n  autonuma which is in aa.git.\n\n  In almost all respects balancenuma is the dumbest of the three because\n  its main impact is on the VM side with no attempt to be smart about\n  scheduling.  In the interest of getting the ball rolling, it would be\n  desirable to see this much merged for 3.8 with the view to building\n  scheduler smarts on top and adapting the VM where required for 3.9.\n\n  The most recent set of comparisons available from different people are\n\n    mel:    https://lkml.org/lkml/2012/12/9/108\n    mingo:  https://lkml.org/lkml/2012/12/7/331\n    tglx:   https://lkml.org/lkml/2012/12/10/437\n    srikar: https://lkml.org/lkml/2012/12/10/397\n\n  The results are a mixed bag.  In my own tests, balancenuma does\n  reasonably well.  It\u0027s dumb as rocks and does not regress against\n  mainline.  On the other hand, Ingo\u0027s tests shows that balancenuma is\n  incapable of converging for this workloads driven by perf which is bad\n  but is potentially explained by the lack of scheduler smarts.  Thomas\u0027\n  results show balancenuma improves on mainline but falls far short of\n  numacore or autonuma.  Srikar\u0027s results indicate we all suffer on a\n  large machine with imbalanced node sizes.\n\n  My own testing showed that recent numacore results have improved\n  dramatically, particularly in the last week but not universally.\n  We\u0027ve butted heads heavily on system CPU usage and high levels of\n  migration even when it shows that overall performance is better.\n  There are also cases where it regresses.  Of interest is that for\n  specjbb in some configurations it will regress for lower numbers of\n  warehouses and show gains for higher numbers which is not reported by\n  the tool by default and sometimes missed in treports.  Recently I\n  reported for numacore that the JVM was crashing with\n  NullPointerExceptions but currently it\u0027s unclear what the source of\n  this problem is.  Initially I thought it was in how numacore batch\n  handles PTEs but I\u0027m no longer think this is the case.  It\u0027s possible\n  numacore is just able to trigger it due to higher rates of migration.\n\n  These reports were quite late in the cycle so I/we would like to start\n  with this tree as it contains much of the code we can agree on and has\n  not changed significantly over the last 2-3 weeks.\"\n\n* tag \u0027balancenuma-v11\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/mel/linux-balancenuma: (50 commits)\n  mm/rmap, migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable\n  mm/rmap: Convert the struct anon_vma::mutex to an rwsem\n  mm: migrate: Account a transhuge page properly when rate limiting\n  mm: numa: Account for failed allocations and isolations as migration failures\n  mm: numa: Add THP migration for the NUMA working set scanning fault case build fix\n  mm: numa: Add THP migration for the NUMA working set scanning fault case.\n  mm: sched: numa: Delay PTE scanning until a task is scheduled on a new node\n  mm: sched: numa: Control enabling and disabling of NUMA balancing if !SCHED_DEBUG\n  mm: sched: numa: Control enabling and disabling of NUMA balancing\n  mm: sched: Adapt the scanning rate if a NUMA hinting fault does not migrate\n  mm: numa: Use a two-stage filter to restrict pages being migrated for unlikely task\u003c-\u003enode relationships\n  mm: numa: migrate: Set last_nid on newly allocated page\n  mm: numa: split_huge_page: Transfer last_nid on tail page\n  mm: numa: Introduce last_nid to the page frame\n  sched: numa: Slowly increase the scanning period as NUMA faults are handled\n  mm: numa: Rate limit setting of pte_numa if node is saturated\n  mm: numa: Rate limit the amount of memory that is migrated between nodes\n  mm: numa: Structures for Migrate On Fault per NUMA migration rate limiting\n  mm: numa: Migrate pages handled during a pmd_numa hinting fault\n  mm: numa: Migrate on reference policy\n  ...\n"
    },
    {
      "commit": "66521d5aa6c0f74b5e90c21569acbaa8c5ac0998",
      "tree": "d77ac5afdf31d18bcf4e47b14fc19df9a6618f9b",
      "parents": [
        "816422ad76474fed8052b6f7b905a054d082e59a"
      ],
      "author": {
        "name": "Dominik Dingel",
        "email": "dingel@linux.vnet.ibm.com",
        "time": "Wed Dec 12 13:52:37 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 12 17:38:35 2012 -0800"
      },
      "message": "mm/memory.c: remove unused code from do_wp_page()\n\npage_mkwrite is initalized with zero and only set once, from that point\nexists no way to get to the oom or oom_free_new labels.\n\n[akpm@linux-foundation.org: cleanup]\nSigned-off-by: Dominik Dingel \u003cdingel@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"
    },
    {
      "commit": "816422ad76474fed8052b6f7b905a054d082e59a",
      "tree": "9918f68e9c5f93be98940b4b7b478e1637547926",
      "parents": [
        "56f2fb147659e05b1e87b99791bf44b988d38545"
      ],
      "author": {
        "name": "Kirill A. Shutemov",
        "email": "kirill.shutemov@linux.intel.com",
        "time": "Wed Dec 12 13:52:36 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 12 17:38:35 2012 -0800"
      },
      "message": "asm-generic, mm: pgtable: consolidate zero page helpers\n\nWe have two different implementation of is_zero_pfn() and my_zero_pfn()\nhelpers: for architectures with and without zero page coloring.\n\nLet\u0027s consolidate them in \u003casm-generic/pgtable.h\u003e.\n\nSigned-off-by: Kirill A. Shutemov \u003ckirill.shutemov@linux.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": "e180377f1ae48b3cbc559c9875d9b038f7f000c6",
      "tree": "c51e0db181acc0372479bce5cd68b99abca7d8bb",
      "parents": [
        "cad7f613c4d010e1d0f05c9a4fb33c7ae40ba115"
      ],
      "author": {
        "name": "Kirill A. Shutemov",
        "email": "kirill.shutemov@linux.intel.com",
        "time": "Wed Dec 12 13:50:59 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 12 17:38:31 2012 -0800"
      },
      "message": "thp: change split_huge_page_pmd() interface\n\nPass vma instead of mm and add address parameter.\n\nIn most cases we already have vma on the stack. We provides\nsplit_huge_page_pmd_mm() for few cases when we have mm, but not vma.\n\nThis change is preparation to huge zero pmd splitting implementation.\n\nSigned-off-by: Kirill A. Shutemov \u003ckirill.shutemov@linux.intel.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: \"H. Peter Anvin\" \u003chpa@linux.intel.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\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": "93b4796dede916de74b21fbd637588da6a99a7ec",
      "tree": "3833de6051bb1b8d361a614743aafa56b43902e1",
      "parents": [
        "fc9fe822f7112db23e51e2be3b886f5d8f0afdb6"
      ],
      "author": {
        "name": "Kirill A. Shutemov",
        "email": "kirill.shutemov@linux.intel.com",
        "time": "Wed Dec 12 13:50:54 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 12 17:38:31 2012 -0800"
      },
      "message": "thp: do_huge_pmd_wp_page(): handle huge zero page\n\nOn write access to huge zero page we alloc a new huge page and clear it.\n\nIf ENOMEM, graceful fallback: we create a new pmd table and set pte around\nfault address to newly allocated normal (4k) page.  All other ptes in the\npmd set to normal zero page.\n\nSigned-off-by: Kirill A. Shutemov \u003ckirill.shutemov@linux.intel.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: \"H. Peter Anvin\" \u003chpa@linux.intel.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\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": "a1dd450bcb1a05e8218b9aac0ee36f8755d8a140",
      "tree": "a46f3306e3802b59ed5df6eef0e03b8b11cca30c",
      "parents": [
        "eb2db439a3203ae86c35ad277ac4a3268a94baa1"
      ],
      "author": {
        "name": "Will Deacon",
        "email": "will.deacon@arm.com",
        "time": "Tue Dec 11 16:01:27 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 11 17:22:24 2012 -0800"
      },
      "message": "mm: thp: set the accessed flag for old pages on access fault\n\nOn x86 memory accesses to pages without the ACCESSED flag set result in\nthe ACCESSED flag being set automatically.  With the ARM architecture a\npage access fault is raised instead (and it will continue to be raised\nuntil the ACCESSED flag is set for the appropriate PTE/PMD).\n\nFor normal memory pages, handle_pte_fault will call pte_mkyoung\n(effectively setting the ACCESSED flag).  For transparent huge pages,\npmd_mkyoung will only be called for a write fault.\n\nThis patch ensures that faults on transparent hugepages which do not\nresult in a CoW update the access flags for the faulting pmd.\n\nSigned-off-by: Will Deacon \u003cwill.deacon@arm.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nAcked-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Ni zhan Chen \u003cnizhan.chen@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": "b8593bfda1652755136333cdd362de125b283a9c",
      "tree": "c0395d9cf775fd9225e81b055fc8f5540a14333a",
      "parents": [
        "e42c8ff2999de1239a57d434bfbd8e9f2a56e814"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Wed Nov 21 01:18:23 2012 +0000"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:55 2012 +0000"
      },
      "message": "mm: sched: Adapt the scanning rate if a NUMA hinting fault does not migrate\n\nThe PTE scanning rate and fault rates are two of the biggest sources of\nsystem CPU overhead with automatic NUMA placement.  Ideally a proper policy\nwould detect if a workload was properly placed, schedule and adjust the\nPTE scanning rate accordingly. We do not track the necessary information\nto do that but we at least know if we migrated or not.\n\nThis patch scans slower if a page was not migrated as the result of a\nNUMA hinting fault up to sysctl_numa_balancing_scan_period_max which is\nnow higher than the previous default. Once every minute it will reset\nthe scanner in case of phase changes.\n\nThis is hilariously crude and the numbers are arbitrary. Workloads will\nconverge quite slowly in comparison to what a proper policy should be able\nto do. On the plus side, we will chew up less CPU for workloads that have\nno need for automatic balancing.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\n"
    },
    {
      "commit": "9532fec118d485ea37ab6e3ea372d68cd8b4cd0d",
      "tree": "5076f3da1ff244df554e99b8701749423a6b92ad",
      "parents": [
        "5606e3877ad8baea42f3a71ebde0a03622bbb551"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Thu Nov 15 01:24:32 2012 +0000"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:49 2012 +0000"
      },
      "message": "mm: numa: Migrate pages handled during a pmd_numa hinting fault\n\nTo say that the PMD handling code was incorrectly transferred from autonuma\nis an understatement. The intention was to handle a PMDs worth of pages\nin the same fault and effectively batch the taking of the PTL and page\nmigration. The copied version instead has the impact of clearing a number\nof pte_numa PTE entries and whether any page migration takes place depends\non racing. This just happens to work in some cases.\n\nThis patch handles pte_numa faults in batch when a pmd_numa fault is\nhandled. The pages are migrated if they are currently misplaced.\nEssentially this is making an assumption that NUMA locality is\non a PMD boundary but that could be addressed by only setting\npmd_numa if all the pages within that PMD are on the same node\nif necessary.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\n"
    },
    {
      "commit": "03c5a6e16322c997bf8f264851bfa3f532ad515f",
      "tree": "df5b09acdcd6d171286afa3f77a7ff56336c8ca6",
      "parents": [
        "4b96a29ba891dd59734cb7be80a900fe93aa2d9f"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Fri Nov 02 14:52:48 2012 +0000"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:48 2012 +0000"
      },
      "message": "mm: numa: Add pte updates, hinting and migration stats\n\nIt is tricky to quantify the basic cost of automatic NUMA placement in a\nmeaningful manner. This patch adds some vmstats that can be used as part\nof a basic costing model.\n\nu    \u003d basic unit \u003d sizeof(void *)\nCa   \u003d cost of struct page access \u003d sizeof(struct page) / u\nCpte \u003d Cost PTE access \u003d Ca\nCupdate \u003d Cost PTE update \u003d (2 * Cpte) + (2 * Wlock)\n\twhere Cpte is incurred twice for a read and a write and Wlock\n\tis a constant representing the cost of taking or releasing a\n\tlock\nCnumahint \u003d Cost of a minor page fault \u003d some high constant e.g. 1000\nCpagerw \u003d Cost to read or write a full page \u003d Ca + PAGE_SIZE/u\nCi \u003d Cost of page isolation \u003d Ca + Wi\n\twhere Wi is a constant that should reflect the approximate cost\n\tof the locking operation\nCpagecopy \u003d Cpagerw + (Cpagerw * Wnuma) + Ci + (Ci * Wnuma)\n\twhere Wnuma is the approximate NUMA factor. 1 is local. 1.2\n\twould imply that remote accesses are 20% more expensive\n\nBalancing cost \u003d Cpte * numa_pte_updates +\n\t\tCnumahint * numa_hint_faults +\n\t\tCi * numa_pages_migrated +\n\t\tCpagecopy * numa_pages_migrated\n\nNote that numa_pages_migrated is used as a measure of how many pages\nwere isolated even though it would miss pages that failed to migrate. A\nvmstat counter could have been added for it but the isolation cost is\npretty marginal in comparison to the overall cost so it seemed overkill.\n\nThe ideal way to measure automatic placement benefit would be to count\nthe number of remote accesses versus local accesses and do something like\n\n\tbenefit \u003d (remote_accesses_before - remove_access_after) * Wnuma\n\nbut the information is not readily available. As a workload converges, the\nexpection would be that the number of remote numa hints would reduce to 0.\n\n\tconvergence \u003d numa_hint_faults_local / numa_hint_faults\n\t\twhere this is measured for the last N number of\n\t\tnuma hints recorded. When the workload is fully\n\t\tconverged the value is 1.\n\nThis can measure if the placement policy is converging and how fast it is\ndoing it.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\n"
    },
    {
      "commit": "cbee9f88ec1b8dd6b58f25f54e4f52c82ed77690",
      "tree": "d4cfbcfa3e89742216cd792d4aa914356406b532",
      "parents": [
        "a720094ded8cbb303111035be91858011d2eac71"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Thu Oct 25 14:16:43 2012 +0200"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:45 2012 +0000"
      },
      "message": "mm: numa: Add fault driven placement and migration\n\nNOTE: This patch is based on \"sched, numa, mm: Add fault driven\n\tplacement and migration policy\" but as it throws away all the policy\n\tto just leave a basic foundation I had to drop the signed-offs-by.\n\nThis patch creates a bare-bones method for setting PTEs pte_numa in the\ncontext of the scheduler that when faulted later will be faulted onto the\nnode the CPU is running on.  In itself this does nothing useful but any\nplacement policy will fundamentally depend on receiving hints on placement\nfrom fault context and doing something intelligent about it.\n\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\n"
    },
    {
      "commit": "4daae3b4b9e49b7e0935499a352f1c59d90287d2",
      "tree": "2ac600b955c89e3b1b2070110a9b7293a4511b19",
      "parents": [
        "149c33e1c98f83050870514f380902dc6d617bd5"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Fri Nov 02 11:33:45 2012 +0000"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:42 2012 +0000"
      },
      "message": "mm: mempolicy: Use _PAGE_NUMA to migrate pages\n\nNote: Based on \"mm/mpol: Use special PROT_NONE to migrate pages\" but\n\tsufficiently different that the signed-off-bys were dropped\n\nCombine our previous _PAGE_NUMA, mpol_misplaced and migrate_misplaced_page()\npieces into an effective migrate on fault scheme.\n\nNote that (on x86) we rely on PROT_NONE pages being !present and avoid\nthe TLB flush from try_to_unmap(TTU_MIGRATION). This greatly improves the\npage-migration performance.\n\nBased-on-work-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\n"
    },
    {
      "commit": "d10e63f29488b0f312a443f9507ea9b6fd3c9090",
      "tree": "b39e3caa5d25e9e5ebad84c606a724e25c6b8e91",
      "parents": [
        "1ba6e0b50b479cbadb8f05ebde3020da9ac87201"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Thu Oct 25 14:16:31 2012 +0200"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:39 2012 +0000"
      },
      "message": "mm: numa: Create basic numa page hinting infrastructure\n\nNote: This patch started as \"mm/mpol: Create special PROT_NONE\n\tinfrastructure\" and preserves the basic idea but steals *very*\n\theavily from \"autonuma: numa hinting page faults entry points\" for\n\tthe actual fault handlers without the migration parts.\tThe end\n\tresult is barely recognisable as either patch so all Signed-off\n\tand Reviewed-bys are dropped. If Peter, Ingo and Andrea are ok with\n\tthis version, I will re-add the signed-offs-by to reflect the history.\n\nIn order to facilitate a lazy -- fault driven -- migration of pages, create\na special transient PAGE_NUMA variant, we can then use the \u0027spurious\u0027\nprotection faults to drive our migrations from.\n\nThe meaning of PAGE_NUMA depends on the architecture but on x86 it is\neffectively PROT_NONE. Actual PROT_NONE mappings will not generate these\nNUMA faults for the reason that the page fault code checks the permission on\nthe VMA (and will throw a segmentation fault on actual PROT_NONE mappings),\nbefore it ever calls handle_mm_fault.\n\n[dhillf@gmail.com: Fix typo]\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\n"
    },
    {
      "commit": "0b9d705297b273657923518dbea2377cd03532ed",
      "tree": "9049d172d6fcd71790a4689c7fed62a912516265",
      "parents": [
        "be3a728427a605990a7a0b6dbf9e29b68e266146"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Fri Oct 05 21:36:27 2012 +0200"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:42:37 2012 +0000"
      },
      "message": "mm: numa: Support NUMA hinting page faults from gup/gup_fast\n\nIntroduce FOLL_NUMA to tell follow_page to check\npte/pmd_numa. get_user_pages must use FOLL_NUMA, and it\u0027s safe to do\nso because it always invokes handle_mm_fault and retries the\nfollow_page later.\n\nKVM secondary MMU page faults will trigger the NUMA hinting page\nfaults through gup_fast -\u003e get_user_pages -\u003e follow_page -\u003e\nhandle_mm_fault.\n\nOther follow_page callers like KSM should not use FOLL_NUMA, or they\nwould fail to get the pages if they use follow_page instead of\nget_user_pages.\n\n[ This patch was picked up from the AutoNUMA tree. ]\n\nOriginally-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\n[ ported to this tree. ]\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\n"
    },
    {
      "commit": "4fd017708c4a067da51a2b5cf8aedddf4e840b1f",
      "tree": "c2b3c9f42a957a0d54fd95411fb3c5626a7efc14",
      "parents": [
        "8d1acce4537c4e2f5889ed9ba9b8eddb80d99820"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Wed Oct 12 21:06:51 2011 +0200"
      },
      "committer": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Dec 11 14:28:34 2012 +0000"
      },
      "message": "mm: Check if PTE is already allocated during page fault\n\nWith transparent hugepage support, handle_mm_fault() has to be careful\nthat a normal PMD has been established before handling a PTE fault. To\nachieve this, it used __pte_alloc() directly instead of pte_alloc_map\nas pte_alloc_map is unsafe to run against a huge PMD. pte_offset_map()\nis called once it is known the PMD is safe.\n\npte_alloc_map() is smart enough to check if a PTE is already present\nbefore calling __pte_alloc but this check was lost. As a consequence,\nPTEs may be allocated unnecessarily and the page table lock taken.\nThi useless PTE does get cleaned up but it\u0027s a performance hit which\nis visible in page_test from aim9.\n\nThis patch simply re-adds the check normally done by pte_alloc_map to\ncheck if the PTE needs to be allocated before taking the page table\nlock. The effect is noticable in page_test from aim9.\n\n AIM9\n                 2.6.38-vanilla 2.6.38-checkptenone\n creat-clo      446.10 ( 0.00%)   424.47 (-5.10%)\n page_test       38.10 ( 0.00%)    42.04 ( 9.37%)\n brk_test        52.45 ( 0.00%)    51.57 (-1.71%)\n exec_test      382.00 ( 0.00%)   456.90 (16.39%)\n fork_test       60.11 ( 0.00%)    67.79 (11.34%)\n MMTests Statistics: duration\n Total Elapsed Time (seconds)                611.90    612.22\n\n(While this affects 2.6.38, it is a performance rather than a\nfunctional bug and normally outside the rules -stable. While the big\nperformance differences are to a microbench, the difference in fork\nand exec performance may be significant enough that -stable wants to\nconsider the patch)\n\nReported-by: Raz Ben Yehuda \u003craziebe@gmail.com\u003e\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\n[ Picked this up from the AutoNUMA tree to help\n  it upstream and to allow apples-to-apples\n  performance comparisons. ]\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "1756954c61cb5c97c618ccb366482b9c1f891d6d",
      "tree": "86a8ab12560d600fa5459218979e72827e0311f5",
      "parents": [
        "63c3b902e517012b127d6528434b928ceaa10f7b"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Fri Nov 16 14:14:48 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Nov 16 14:33:03 2012 -0800"
      },
      "message": "mm: fix build warning for uninitialized value\n\ndo_wp_page() sets mmun_called if mmun_start and mmun_end were\ninitialized and, if so, may call mmu_notifier_invalidate_range_end()\nwith these values.  This doesn\u0027t prevent gcc from emitting a build\nwarning though:\n\n  mm/memory.c: In function `do_wp_page\u0027:\n  mm/memory.c:2530: warning: `mmun_start\u0027 may be used uninitialized in this function\n  mm/memory.c:2531: warning: `mmun_end\u0027 may be used uninitialized in this function\n\nIt\u0027s much easier to initialize the variables to impossible values and do\na simple comparison to determine if they were initialized to remove the\nbool entirely.\n\nSigned-off-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": "b676b293fb48672904ee1b9828cb50b4eed01717",
      "tree": "22b2dcc1623da40a5ddfaf6db2bc5ab1c2476ddb",
      "parents": [
        "e90bdb7f52f94204c78fb40b0804645defdebd71"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Mon Oct 08 16:34:03 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:23:02 2012 +0900"
      },
      "message": "mm, thp: fix mapped pages avoiding unevictable list on mlock\n\nWhen a transparent hugepage is mapped and it is included in an mlock()\nrange, follow_page() incorrectly avoids setting the page\u0027s mlock bit and\nmoving it to the unevictable lru.\n\nThis is evident if you try to mlock(), munlock(), and then mlock() a\nrange again.  Currently:\n\n\t#define MAP_SIZE\t(4 \u003c\u003c 30)\t/* 4GB */\n\n\tvoid *ptr \u003d mmap(NULL, MAP_SIZE, PROT_READ | PROT_WRITE,\n\t\t\t MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);\n\tmlock(ptr, MAP_SIZE);\n\n\t\t$ grep -E \"Unevictable|Inactive\\(anon\" /proc/meminfo\n\t\tInactive(anon):     6304 kB\n\t\tUnevictable:     4213924 kB\n\n\tmunlock(ptr, MAP_SIZE);\n\n\t\tInactive(anon):  4186252 kB\n\t\tUnevictable:       19652 kB\n\n\tmlock(ptr, MAP_SIZE);\n\n\t\tInactive(anon):  4198556 kB\n\t\tUnevictable:       21684 kB\n\nNotice that less than 2MB was added to the unevictable list; this is\nbecause these pages in the range are not transparent hugepages since the\n4GB range was allocated with mmap() and has no specific alignment.  If\nposix_memalign() were used instead, unevictable would not have grown at\nall on the second mlock().\n\nThe fix is to call mlock_vma_page() so that the mlock bit is set and the\npage is added to the unevictable list.  With this patch:\n\n\tmlock(ptr, MAP_SIZE);\n\n\t\tInactive(anon):     4056 kB\n\t\tUnevictable:     4213940 kB\n\n\tmunlock(ptr, MAP_SIZE);\n\n\t\tInactive(anon):  4198268 kB\n\t\tUnevictable:       19636 kB\n\n\tmlock(ptr, MAP_SIZE);\n\n\t\tInactive(anon):     4008 kB\n\t\tUnevictable:     4213940 kB\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Naoya Horiguchi \u003cn-horiguchi@ah.jp.nec.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: 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": "c462f179e4d273f0da0e7cf302e29b0edf43844e",
      "tree": "12e674acb1b3ea99541121d83b85a8dab84b5413",
      "parents": [
        "8befedfe678ff84d5bc356be4f3cb1fd84959d02"
      ],
      "author": {
        "name": "Robert P. J. Day",
        "email": "rpjday@crashcourse.ca",
        "time": "Mon Oct 08 16:33:43 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:59 2012 +0900"
      },
      "message": "mm/memory.c: fix typo in comment\n\nSigned-off-by: Robert P. J. Day \u003crpjday@crashcourse.ca\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "6bdb913f0a70a4dfb7f066fb15e2d6f960701d00",
      "tree": "9a61960b27bf801794104b8bb8fccee1813f1b4b",
      "parents": [
        "2ec74c3ef2d8c58d71e0e00336fb6b891192155a"
      ],
      "author": {
        "name": "Haggai Eran",
        "email": "haggaie@mellanox.com",
        "time": "Mon Oct 08 16:33:35 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:58 2012 +0900"
      },
      "message": "mm: wrap calls to set_pte_at_notify with invalidate_range_start and invalidate_range_end\n\nIn order to allow sleeping during invalidate_page mmu notifier calls, we\nneed to avoid calling when holding the PT lock.  In addition to its direct\ncalls, invalidate_page can also be called as a substitute for a change_pte\ncall, in case the notifier client hasn\u0027t implemented change_pte.\n\nThis patch drops the invalidate_page call from change_pte, and instead\nwraps all calls to change_pte with invalidate_range_start and\ninvalidate_range_end calls.\n\nNote that change_pte still cannot sleep after this patch, and that clients\nimplementing change_pte should not take action on it in case the number of\noutstanding invalidate_range_start calls is larger than one, otherwise\nthey might miss a later invalidation.\n\nSigned-off-by: Haggai Eran \u003chaggaie@mellanox.com\u003e\nCc: Andrea Arcangeli \u003candrea@qumranet.com\u003e\nCc: Sagi Grimberg \u003csagig@mellanox.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Or Gerlitz \u003cogerlitz@mellanox.com\u003e\nCc: Haggai Eran \u003chaggaie@mellanox.com\u003e\nCc: Shachar Raindel \u003craindel@mellanox.com\u003e\nCc: Liran Liss \u003cliranl@mellanox.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2ec74c3ef2d8c58d71e0e00336fb6b891192155a",
      "tree": "512b591504cdbee278c27afc50a7e3a558b4851a",
      "parents": [
        "36e4f20af833d1ce196e6a4ade05dc26c44652d1"
      ],
      "author": {
        "name": "Sagi Grimberg",
        "email": "sagig@mellanox.com",
        "time": "Mon Oct 08 16:33:33 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:58 2012 +0900"
      },
      "message": "mm: move all mmu notifier invocations to be done outside the PT lock\n\nIn order to allow sleeping during mmu notifier calls, we need to avoid\ninvoking them under the page table spinlock.  This patch solves the\nproblem by calling invalidate_page notification after releasing the lock\n(but before freeing the page itself), or by wrapping the page invalidation\nwith calls to invalidate_range_begin and invalidate_range_end.\n\nTo prevent accidental changes to the invalidate_range_end arguments after\nthe call to invalidate_range_begin, the patch introduces a convention of\nsaving the arguments in consistently named locals:\n\n\tunsigned long mmun_start;\t/* For mmu_notifiers */\n\tunsigned long mmun_end;\t/* For mmu_notifiers */\n\n\t...\n\n\tmmun_start \u003d ...\n\tmmun_end \u003d ...\n\tmmu_notifier_invalidate_range_start(mm, mmun_start, mmun_end);\n\n\t...\n\n\tmmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end);\n\nThe patch changes code to use this convention for all calls to\nmmu_notifier_invalidate_range_start/end, except those where the calls are\nclose enough so that anyone who glances at the code can see the values\naren\u0027t changing.\n\nThis patchset is a preliminary step towards on-demand paging design to be\nadded to the RDMA stack.\n\nWhy do we want on-demand paging for Infiniband?\n\n  Applications register memory with an RDMA adapter using system calls,\n  and subsequently post IO operations that refer to the corresponding\n  virtual addresses directly to HW.  Until now, this was achieved by\n  pinning the memory during the registration calls.  The goal of on demand\n  paging is to avoid pinning the pages of registered memory regions (MRs).\n   This will allow users the same flexibility they get when swapping any\n  other part of their processes address spaces.  Instead of requiring the\n  entire MR to fit in physical memory, we can allow the MR to be larger,\n  and only fit the current working set in physical memory.\n\nWhy should anyone care?  What problems are users currently experiencing?\n\n  This can make programming with RDMA much simpler.  Today, developers\n  that are working with more data than their RAM can hold need either to\n  deregister and reregister memory regions throughout their process\u0027s\n  life, or keep a single memory region and copy the data to it.  On demand\n  paging will allow these developers to register a single MR at the\n  beginning of their process\u0027s life, and let the operating system manage\n  which pages needs to be fetched at a given time.  In the future, we\n  might be able to provide a single memory access key for each process\n  that would provide the entire process\u0027s address as one large memory\n  region, and the developers wouldn\u0027t need to register memory regions at\n  all.\n\nIs there any prospect that any other subsystems will utilise these\ninfrastructural changes?  If so, which and how, etc?\n\n  As for other subsystems, I understand that XPMEM wanted to sleep in\n  MMU notifiers, as Christoph Lameter wrote at\n  http://lkml.indiana.edu/hypermail/linux/kernel/0802.1/0460.html and\n  perhaps Andrea knows about other use cases.\n\n  Scheduling in mmu notifications is required since we need to sync the\n  hardware with the secondary page tables change.  A TLB flush of an IO\n  device is inherently slower than a CPU TLB flush, so our design works by\n  sending the invalidation request to the device, and waiting for an\n  interrupt before exiting the mmu notifier handler.\n\nAvi said:\n\n  kvm may be a buyer.  kvm::mmu_lock, which serializes guest page\n  faults, also protects long operations such as destroying large ranges.\n  It would be good to convert it into a spinlock, but as it is used inside\n  mmu notifiers, this cannot be done.\n\n  (there are alternatives, such as keeping the spinlock and using a\n  generation counter to do the teardown in O(1), which is what the \"may\"\n  is doing up there).\n\n[akpm@linux-foundation.orgpossible speed tweak in hugetlb_cow(), cleanups]\nSigned-off-by: Andrea Arcangeli \u003candrea@qumranet.com\u003e\nSigned-off-by: Sagi Grimberg \u003csagig@mellanox.com\u003e\nSigned-off-by: Haggai Eran \u003chaggaie@mellanox.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Xiao Guangrong \u003cxiaoguangrong@linux.vnet.ibm.com\u003e\nCc: Or Gerlitz \u003cogerlitz@mellanox.com\u003e\nCc: Haggai Eran \u003chaggaie@mellanox.com\u003e\nCc: Shachar Raindel \u003craindel@mellanox.com\u003e\nCc: Liran Liss \u003cliranl@mellanox.com\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "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": "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": "314e51b9851b4f4e8ab302243ff5a6fc6147f379",
      "tree": "f757b89206355fd129830782566768693eed23ce",
      "parents": [
        "0103bd16fb90bc741c7a03fd1ea4e8a505abad23"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Mon Oct 08 16:29:02 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:19 2012 +0900"
      },
      "message": "mm: kill vma flag VM_RESERVED and mm-\u003ereserved_vm counter\n\nA long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,\ncurrently it lost original meaning but still has some effects:\n\n | effect                 | alternative flags\n-+------------------------+---------------------------------------------\n1| account as reserved_vm | VM_IO\n2| skip in core dump      | VM_IO, VM_DONTDUMP\n3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP\n4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP\n\nThis patch removes reserved_vm counter from mm_struct.  Seems like nobody\ncares about it, it does not exported into userspace directly, it only\nreduces total_vm showed in proc.\n\nThus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.\n\nremap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.\nremap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.\n\n[akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Carsten Otte \u003ccotte@de.ibm.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nCc: Eric Paris \u003ceparis@redhat.com\u003e\nCc: H. Peter Anvin \u003chpa@zytor.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: James Morris \u003cjames.l.morris@oracle.com\u003e\nCc: Jason Baron \u003cjbaron@redhat.com\u003e\nCc: Kentaro Takeda \u003ctakedakn@nttdata.co.jp\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Robert Richter \u003crobert.richter@amd.com\u003e\nCc: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nCc: Tetsuo Handa \u003cpenguin-kernel@I-love.SAKURA.ne.jp\u003e\nCc: Venkatesh Pallipadi \u003cvenki@google.com\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4b6e1e37026ec7dae9b23d78ffcebdd5ddb1bfa1",
      "tree": "10200483a705005f41f543ed433581409cf2bf5f",
      "parents": [
        "cc2383ec06be093789469852e1fe96e1148e9a2c"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Mon Oct 08 16:28:40 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:17 2012 +0900"
      },
      "message": "mm: kill vma flag VM_INSERTPAGE\n\nMerge VM_INSERTPAGE into VM_MIXEDMAP.  VM_MIXEDMAP VMA can mix pure-pfn\nptes, special ptes and normal ptes.\n\nNow copy_page_range() always copies VM_MIXEDMAP VMA on fork like\nVM_PFNMAP.  If driver populates whole VMA at mmap() it probably not\nexpects page-faults.\n\nThis patch removes special check from vma_wants_writenotify() which\ndisables pages write tracking for VMA populated via vm_instert_page().\nBDI below mapped file should not use dirty-accounting, moreover\ndo_wp_page() can handle this.\n\nvm_insert_page() still marks vma after first usage.  Usually it is called\nfrom f_op-\u003emmap() handler under mm-\u003emmap_sem write-lock, so it able to\nchange vma-\u003evm_flags.  Caller must set VM_MIXEDMAP at mmap time if it\nwants to call this function from other places, for example from page-fault\nhandler.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Carsten Otte \u003ccotte@de.ibm.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nCc: Eric Paris \u003ceparis@redhat.com\u003e\nCc: H. Peter Anvin \u003chpa@zytor.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: James Morris \u003cjames.l.morris@oracle.com\u003e\nCc: Jason Baron \u003cjbaron@redhat.com\u003e\nCc: Kentaro Takeda \u003ctakedakn@nttdata.co.jp\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Robert Richter \u003crobert.richter@amd.com\u003e\nCc: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nCc: Tetsuo Handa \u003cpenguin-kernel@I-love.SAKURA.ne.jp\u003e\nCc: Venkatesh Pallipadi \u003cvenki@google.com\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b3b9c2932c32e0692018ed5f12f3fd8c70eea8ce",
      "tree": "bca2431f0b0bd2d364f041f0344836cd39b1822c",
      "parents": [
        "5180da410db6369d1f95c9014da1c9bc33fb043e"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Mon Oct 08 16:28:34 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:16 2012 +0900"
      },
      "message": "mm, x86, pat: rework linear pfn-mmap tracking\n\nReplace the generic vma-flag VM_PFN_AT_MMAP with x86-only VM_PAT.\n\nWe can toss mapping address from remap_pfn_range() into\ntrack_pfn_vma_new(), and collect all PAT-related logic together in\narch/x86/.\n\nThis patch also restores orignal frustration-free is_cow_mapping() check\nin remap_pfn_range(), as it was before commit v2.6.28-rc8-88-g3c8bb73\n(\"x86: PAT: store vm_pgoff for all linear_over_vma_region mappings - v3\")\n\nis_linear_pfn_mapping() checks can be removed from mm/huge_memory.c,\nbecause it already handled by VM_PFNMAP in VM_NO_THP bit-mask.\n\n[suresh.b.siddha@intel.com: Reset the VM_PAT flag as part of untrack_pfn_vma()]\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nSigned-off-by: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nCc: Venkatesh Pallipadi \u003cvenki@google.com\u003e\nCc: H. Peter Anvin \u003chpa@zytor.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Carsten Otte \u003ccotte@de.ibm.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nCc: Eric Paris \u003ceparis@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: James Morris \u003cjames.l.morris@oracle.com\u003e\nCc: Jason Baron \u003cjbaron@redhat.com\u003e\nCc: Kentaro Takeda \u003ctakedakn@nttdata.co.jp\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Robert Richter \u003crobert.richter@amd.com\u003e\nCc: Tetsuo Handa \u003cpenguin-kernel@I-love.SAKURA.ne.jp\u003e\nCc: Venkatesh Pallipadi \u003cvenki@google.com\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5180da410db6369d1f95c9014da1c9bc33fb043e",
      "tree": "1d92975710b33a90f77f39d0ad33669329dea949",
      "parents": [
        "b1a86e15dc0304366f50ba1720834bc419c801b1"
      ],
      "author": {
        "name": "Suresh Siddha",
        "email": "suresh.b.siddha@intel.com",
        "time": "Mon Oct 08 16:28:29 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 09 16:22:16 2012 +0900"
      },
      "message": "x86, pat: separate the pfn attribute tracking for remap_pfn_range and vm_insert_pfn\n\nWith PAT enabled, vm_insert_pfn() looks up the existing pfn memory\nattribute and uses it.  Expectation is that the driver reserves the\nmemory attributes for the pfn before calling vm_insert_pfn().\n\nremap_pfn_range() (when called for the whole vma) will setup a new\nattribute (based on the prot argument) for the specified pfn range.\nThis addresses the legacy usage which typically calls remap_pfn_range()\nwith a desired memory attribute.  For ranges smaller than the vma size\n(which is typically not the case), remap_pfn_range() will use the\nexisting memory attribute for the pfn range.\n\nExpose two different API\u0027s for these different behaviors.\ntrack_pfn_insert() for tracking the pfn attribute set by vm_insert_pfn()\nand track_pfn_remap() for the remap_pfn_range().\n\nThis cleanup also prepares the ground for the track/untrack pfn vma\nroutines to take over the ownership of setting PAT specific vm_flag in\nthe \u0027vma\u0027.\n\n[khlebnikov@openvz.org: Clear checks in track_pfn_remap()]\n[akpm@linux-foundation.org: tweak a few comments]\nSigned-off-by: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Venkatesh Pallipadi \u003cvenki@google.com\u003e\nCc: H. Peter Anvin \u003chpa@zytor.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Carsten Otte \u003ccotte@de.ibm.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Cyrill Gorcunov \u003cgorcunov@openvz.org\u003e\nCc: Eric Paris \u003ceparis@redhat.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: James Morris \u003cjames.l.morris@oracle.com\u003e\nCc: Jason Baron \u003cjbaron@redhat.com\u003e\nCc: Kentaro Takeda \u003ctakedakn@nttdata.co.jp\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Matt Helsley \u003cmatthltc@us.ibm.com\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Robert Richter \u003crobert.richter@amd.com\u003e\nCc: Suresh Siddha \u003csuresh.b.siddha@intel.com\u003e\nCc: Tetsuo Handa \u003cpenguin-kernel@I-love.SAKURA.ne.jp\u003e\nAcked-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a0e881b7c189fa2bd76c024dbff91e79511c971d",
      "tree": "0c801918565b08921d21aceee5b326f64d998f5f",
      "parents": [
        "eff0d13f3823f35d70228cd151d2a2c89288ff32",
        "dbc6e0222d79e78925fe20733844a796a4b72cf9"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 01 10:26:23 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Aug 01 10:26:23 2012 -0700"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs\n\nPull second vfs pile from Al Viro:\n \"The stuff in there: fsfreeze deadlock fixes by Jan (essentially, the\n  deadlock reproduced by xfstests 068), symlink and hardlink restriction\n  patches, plus assorted cleanups and fixes.\n\n  Note that another fsfreeze deadlock (emergency thaw one) is *not*\n  dealt with - the series by Fernando conflicts a lot with Jan\u0027s, breaks\n  userland ABI (FIFREEZE semantics gets changed) and trades the deadlock\n  for massive vfsmount leak; this is going to be handled next cycle.\n  There probably will be another pull request, but that stuff won\u0027t be\n  in it.\"\n\nFix up trivial conflicts due to unrelated changes next to each other in\ndrivers/{staging/gdm72xx/usb_boot.c, usb/gadget/storage_common.c}\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (54 commits)\n  delousing target_core_file a bit\n  Documentation: Correct s_umount state for freeze_fs/unfreeze_fs\n  fs: Remove old freezing mechanism\n  ext2: Implement freezing\n  btrfs: Convert to new freezing mechanism\n  nilfs2: Convert to new freezing mechanism\n  ntfs: Convert to new freezing mechanism\n  fuse: Convert to new freezing mechanism\n  gfs2: Convert to new freezing mechanism\n  ocfs2: Convert to new freezing mechanism\n  xfs: Convert to new freezing code\n  ext4: Convert to new freezing mechanism\n  fs: Protect write paths by sb_start_write - sb_end_write\n  fs: Skip atime update on frozen filesystem\n  fs: Add freezing handling to mnt_want_write() / mnt_drop_write()\n  fs: Improve filesystem freezing handling\n  switch the protection of percpu_counter list to spinlock\n  nfsd: Push mnt_want_write() outside of i_mutex\n  btrfs: Push mnt_want_write() outside of i_mutex\n  fat: Push mnt_want_write() outside of i_mutex\n  ...\n"
    },
    {
      "commit": "d833352a4338dc31295ed832a30c9ccff5c7a183",
      "tree": "17d0da8ace1daaabe465304bca861c38e85216b5",
      "parents": [
        "09c231cb8bfdc35e7d896850d34440b8553b084f"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mgorman@suse.de",
        "time": "Tue Jul 31 16:46:20 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:50 2012 -0700"
      },
      "message": "mm: hugetlbfs: close race during teardown of hugetlbfs shared page tables\n\nIf a process creates a large hugetlbfs mapping that is eligible for page\ntable sharing and forks heavily with children some of whom fault and\nothers which destroy the mapping then it is possible for page tables to\nget corrupted.  Some teardowns of the mapping encounter a \"bad pmd\" and\noutput a message to the kernel log.  The final teardown will trigger a\nBUG_ON in mm/filemap.c.\n\nThis was reproduced in 3.4 but is known to have existed for a long time\nand goes back at least as far as 2.6.37.  It was probably was introduced\nin 2.6.20 by [39dde65c: shared page table for hugetlb page].  The messages\nlook like this;\n\n[  ..........] Lots of bad pmd messages followed by this\n[  127.164256] mm/memory.c:391: bad pmd ffff880412e04fe8(80000003de4000e7).\n[  127.164257] mm/memory.c:391: bad pmd ffff880412e04ff0(80000003de6000e7).\n[  127.164258] mm/memory.c:391: bad pmd ffff880412e04ff8(80000003de0000e7).\n[  127.186778] ------------[ cut here ]------------\n[  127.186781] kernel BUG at mm/filemap.c:134!\n[  127.186782] invalid opcode: 0000 [#1] SMP\n[  127.186783] CPU 7\n[  127.186784] Modules linked in: af_packet cpufreq_conservative cpufreq_userspace cpufreq_powersave acpi_cpufreq mperf ext3 jbd dm_mod coretemp crc32c_intel usb_storage ghash_clmulni_intel aesni_intel i2c_i801 r8169 mii uas sr_mod cdrom sg iTCO_wdt iTCO_vendor_support shpchp serio_raw cryptd aes_x86_64 e1000e pci_hotplug dcdbas aes_generic container microcode ext4 mbcache jbd2 crc16 sd_mod crc_t10dif i915 drm_kms_helper drm i2c_algo_bit ehci_hcd ahci libahci usbcore rtc_cmos usb_common button i2c_core intel_agp video intel_gtt fan processor thermal thermal_sys hwmon ata_generic pata_atiixp libata scsi_mod\n[  127.186801]\n[  127.186802] Pid: 9017, comm: hugetlbfs-test Not tainted 3.4.0-autobuild #53 Dell Inc. OptiPlex 990/06D7TR\n[  127.186804] RIP: 0010:[\u003cffffffff810ed6ce\u003e]  [\u003cffffffff810ed6ce\u003e] __delete_from_page_cache+0x15e/0x160\n[  127.186809] RSP: 0000:ffff8804144b5c08  EFLAGS: 00010002\n[  127.186810] RAX: 0000000000000001 RBX: ffffea000a5c9000 RCX: 00000000ffffffc0\n[  127.186811] RDX: 0000000000000000 RSI: 0000000000000009 RDI: ffff88042dfdad00\n[  127.186812] RBP: ffff8804144b5c18 R08: 0000000000000009 R09: 0000000000000003\n[  127.186813] R10: 0000000000000000 R11: 000000000000002d R12: ffff880412ff83d8\n[  127.186814] R13: ffff880412ff83d8 R14: 0000000000000000 R15: ffff880412ff83d8\n[  127.186815] FS:  00007fe18ed2c700(0000) GS:ffff88042dce0000(0000) knlGS:0000000000000000\n[  127.186816] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n[  127.186817] CR2: 00007fe340000503 CR3: 0000000417a14000 CR4: 00000000000407e0\n[  127.186818] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n[  127.186819] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n[  127.186820] Process hugetlbfs-test (pid: 9017, threadinfo ffff8804144b4000, task ffff880417f803c0)\n[  127.186821] Stack:\n[  127.186822]  ffffea000a5c9000 0000000000000000 ffff8804144b5c48 ffffffff810ed83b\n[  127.186824]  ffff8804144b5c48 000000000000138a 0000000000001387 ffff8804144b5c98\n[  127.186825]  ffff8804144b5d48 ffffffff811bc925 ffff8804144b5cb8 0000000000000000\n[  127.186827] Call Trace:\n[  127.186829]  [\u003cffffffff810ed83b\u003e] delete_from_page_cache+0x3b/0x80\n[  127.186832]  [\u003cffffffff811bc925\u003e] truncate_hugepages+0x115/0x220\n[  127.186834]  [\u003cffffffff811bca43\u003e] hugetlbfs_evict_inode+0x13/0x30\n[  127.186837]  [\u003cffffffff811655c7\u003e] evict+0xa7/0x1b0\n[  127.186839]  [\u003cffffffff811657a3\u003e] iput_final+0xd3/0x1f0\n[  127.186840]  [\u003cffffffff811658f9\u003e] iput+0x39/0x50\n[  127.186842]  [\u003cffffffff81162708\u003e] d_kill+0xf8/0x130\n[  127.186843]  [\u003cffffffff81162812\u003e] dput+0xd2/0x1a0\n[  127.186845]  [\u003cffffffff8114e2d0\u003e] __fput+0x170/0x230\n[  127.186848]  [\u003cffffffff81236e0e\u003e] ? rb_erase+0xce/0x150\n[  127.186849]  [\u003cffffffff8114e3ad\u003e] fput+0x1d/0x30\n[  127.186851]  [\u003cffffffff81117db7\u003e] remove_vma+0x37/0x80\n[  127.186853]  [\u003cffffffff81119182\u003e] do_munmap+0x2d2/0x360\n[  127.186855]  [\u003cffffffff811cc639\u003e] sys_shmdt+0xc9/0x170\n[  127.186857]  [\u003cffffffff81410a39\u003e] system_call_fastpath+0x16/0x1b\n[  127.186858] Code: 0f 1f 44 00 00 48 8b 43 08 48 8b 00 48 8b 40 28 8b b0 40 03 00 00 85 f6 0f 88 df fe ff ff 48 89 df e8 e7 cb 05 00 e9 d2 fe ff ff \u003c0f\u003e 0b 55 83 e2 fd 48 89 e5 48 83 ec 30 48 89 5d d8 4c 89 65 e0\n[  127.186868] RIP  [\u003cffffffff810ed6ce\u003e] __delete_from_page_cache+0x15e/0x160\n[  127.186870]  RSP \u003cffff8804144b5c08\u003e\n[  127.186871] ---[ end trace 7cbac5d1db69f426 ]---\n\nThe bug is a race and not always easy to reproduce.  To reproduce it I was\ndoing the following on a single socket I7-based machine with 16G of RAM.\n\n$ hugeadm --pool-pages-max DEFAULT:13G\n$ echo $((18*1048576*1024)) \u003e /proc/sys/kernel/shmmax\n$ echo $((18*1048576*1024)) \u003e /proc/sys/kernel/shmall\n$ for i in `seq 1 9000`; do ./hugetlbfs-test; done\n\nOn my particular machine, it usually triggers within 10 minutes but\nenabling debug options can change the timing such that it never hits.\nOnce the bug is triggered, the machine is in trouble and needs to be\nrebooted.  The machine will respond but processes accessing proc like \"ps\naux\" will hang due to the BUG_ON.  shutdown will also hang and needs a\nhard reset or a sysrq-b.\n\nThe basic problem is a race between page table sharing and teardown.  For\nthe most part page table sharing depends on i_mmap_mutex.  In some cases,\nit is also taking the mm-\u003epage_table_lock for the PTE updates but with\nshared page tables, it is the i_mmap_mutex that is more important.\n\nUnfortunately it appears to be also insufficient. Consider the following\nsituation\n\nProcess A\t\t\t\t\tProcess B\n---------\t\t\t\t\t---------\nhugetlb_fault\t\t\t\t\tshmdt\n  \t\t\t\t\t\tLockWrite(mmap_sem)\n    \t\t\t\t\t\t  do_munmap\n\t\t\t\t\t\t    unmap_region\n\t\t\t\t\t\t      unmap_vmas\n\t\t\t\t\t\t        unmap_single_vma\n\t\t\t\t\t\t          unmap_hugepage_range\n      \t\t\t\t\t\t            Lock(i_mmap_mutex)\n\t\t\t\t\t\t\t    Lock(mm-\u003epage_table_lock)\n\t\t\t\t\t\t\t    huge_pmd_unshare/unmap tables \u003c--- (1)\n\t\t\t\t\t\t\t    Unlock(mm-\u003epage_table_lock)\n      \t\t\t\t\t\t            Unlock(i_mmap_mutex)\n  huge_pte_alloc\t\t\t\t      ...\n    Lock(i_mmap_mutex)\t\t\t\t      ...\n    vma_prio_walk, find svma, spte\t\t      ...\n    Lock(mm-\u003epage_table_lock)\t\t\t      ...\n    share spte\t\t\t\t\t      ...\n    Unlock(mm-\u003epage_table_lock)\t\t\t      ...\n    Unlock(i_mmap_mutex)\t\t\t      ...\n  hugetlb_no_page\t\t\t\t\t\t\t\t\t  \u003c--- (2)\n\t\t\t\t\t\t      free_pgtables\n\t\t\t\t\t\t        unlink_file_vma\n\t\t\t\t\t\t\thugetlb_free_pgd_range\n\t\t\t\t\t\t    remove_vma_list\n\nIn this scenario, it is possible for Process A to share page tables with\nProcess B that is trying to tear them down.  The i_mmap_mutex on its own\ndoes not prevent Process A walking Process B\u0027s page tables.  At (1) above,\nthe page tables are not shared yet so it unmaps the PMDs.  Process A sets\nup page table sharing and at (2) faults a new entry.  Process B then trips\nup on it in free_pgtables.\n\nThis patch fixes the problem by adding a new function\n__unmap_hugepage_range_final that is only called when the VMA is about to\nbe destroyed.  This function clears VM_MAYSHARE during\nunmap_hugepage_range() under the i_mmap_mutex.  This makes the VMA\nineligible for sharing and avoids the race.  Superficially this looks like\nit would then be vunerable to truncate and madvise issues but hugetlbfs\nhas its own truncate handlers so does not use unmap_mapping_range() and\ndoes not support madvise(DONTNEED).\n\nThis should be treated as a -stable candidate if it is merged.\n\nTest program is as follows. The test case was mostly written by Michal\nHocko with a few minor changes to reproduce this bug.\n\n\u003d\u003d\u003d\u003d CUT HERE \u003d\u003d\u003d\u003d\n\nstatic size_t huge_page_size \u003d (2UL \u003c\u003c 20);\nstatic size_t nr_huge_page_A \u003d 512;\nstatic size_t nr_huge_page_B \u003d 5632;\n\nunsigned int get_random(unsigned int max)\n{\n\tstruct timeval tv;\n\n\tgettimeofday(\u0026tv, NULL);\n\tsrandom(tv.tv_usec);\n\treturn random() % max;\n}\n\nstatic void play(void *addr, size_t size)\n{\n\tunsigned char *start \u003d addr,\n\t\t      *end \u003d start + size,\n\t\t      *a;\n\tstart +\u003d get_random(size/2);\n\n\t/* we could itterate on huge pages but let\u0027s give it more time. */\n\tfor (a \u003d start; a \u003c end; a +\u003d 4096)\n\t\t*a \u003d 0;\n}\n\nint main(int argc, char **argv)\n{\n\tkey_t key \u003d IPC_PRIVATE;\n\tsize_t sizeA \u003d nr_huge_page_A * huge_page_size;\n\tsize_t sizeB \u003d nr_huge_page_B * huge_page_size;\n\tint shmidA, shmidB;\n\tvoid *addrA \u003d NULL, *addrB \u003d NULL;\n\tint nr_children \u003d 300, n \u003d 0;\n\n\tif ((shmidA \u003d shmget(key, sizeA, IPC_CREAT|SHM_HUGETLB|0660)) \u003d\u003d -1) {\n\t\tperror(\"shmget:\");\n\t\treturn 1;\n\t}\n\n\tif ((addrA \u003d shmat(shmidA, addrA, SHM_R|SHM_W)) \u003d\u003d (void *)-1UL) {\n\t\tperror(\"shmat\");\n\t\treturn 1;\n\t}\n\tif ((shmidB \u003d shmget(key, sizeB, IPC_CREAT|SHM_HUGETLB|0660)) \u003d\u003d -1) {\n\t\tperror(\"shmget:\");\n\t\treturn 1;\n\t}\n\n\tif ((addrB \u003d shmat(shmidB, addrB, SHM_R|SHM_W)) \u003d\u003d (void *)-1UL) {\n\t\tperror(\"shmat\");\n\t\treturn 1;\n\t}\n\nfork_child:\n\tswitch(fork()) {\n\t\tcase 0:\n\t\t\tswitch (n%3) {\n\t\t\tcase 0:\n\t\t\t\tplay(addrA, sizeA);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tplay(addrB, sizeB);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase -1:\n\t\t\tperror(\"fork:\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (++n \u003c nr_children)\n\t\t\t\tgoto fork_child;\n\t\t\tplay(addrA, sizeA);\n\t\t\tbreak;\n\t}\n\tshmdt(addrA);\n\tshmdt(addrB);\n\tdo {\n\t\twait(NULL);\n\t} while (--n \u003e 0);\n\tshmctl(shmidA, IPC_RMID, NULL);\n\tshmctl(shmidB, IPC_RMID, NULL);\n\treturn 0;\n}\n\n[akpm@linux-foundation.org: name the declaration\u0027s args, fix CONFIG_HUGETLBFS\u003dn build]\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nReviewed-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nSigned-off-by: Mel Gorman \u003cmgorman@suse.de\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": "51a07e50b230d14e1b8bef50d66655d003fa006c",
      "tree": "20e79dbe3e7d86f23ff6d877a68eea0c00aabeee",
      "parents": [
        "8e125cd85517c9716695b0abfabc0a4a3fcb94f3"
      ],
      "author": {
        "name": "Jeff Liu",
        "email": "jeff.liu@oracle.com",
        "time": "Tue Jul 31 16:43:18 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:43 2012 -0700"
      },
      "message": "mm/memory.c:print_vma_addr(): call up_read(\u0026mm-\u003emmap_sem) directly\n\nCall up_read(\u0026mm-\u003emmap_sem) directly since we have already got mm via\ncurrent-\u003emm at the beginning of print_vma_addr().\n\nSigned-off-by: Jie Liu \u003cjeff.liu@oracle.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "24669e58477e2752c1fbca9c1c988e9dd0d79d15",
      "tree": "a4fe04fc1cc2b5a2d89b67f745185b9e9640426f",
      "parents": [
        "972dc4de13f667a7df27ee32573b2e6fc6cc8434"
      ],
      "author": {
        "name": "Aneesh Kumar K.V",
        "email": "aneesh.kumar@linux.vnet.ibm.com",
        "time": "Tue Jul 31 16:42:03 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 31 18:42:40 2012 -0700"
      },
      "message": "hugetlb: use mmu_gather instead of a temporary linked list for accumulating pages\n\nUse a mmu_gather instead of a temporary linked list for accumulating pages\nwhen we unmap a hugepage range\n\nSigned-off-by: Aneesh Kumar K.V \u003caneesh.kumar@linux.vnet.ibm.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\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": "41c4d25f78c01ede13efee1f2e979f3f35dd26f6",
      "tree": "30eeb0d8beea61b24bda3357997bd288f2bbbd3c",
      "parents": [
        "14ae417c6faf28b6e8ec60cc2aa0eaa19453a41c"
      ],
      "author": {
        "name": "Jan Kara",
        "email": "jack@suse.cz",
        "time": "Tue Jun 12 16:20:28 2012 +0200"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Tue Jul 31 01:02:48 2012 +0400"
      },
      "message": "mm: Update file times from fault path only if .page_mkwrite is not set\n\nFilesystems wanting to properly support freezing need to have control\nwhen file_update_time() is called. After pushing file_update_time()\nto all relevant .page_mkwrite implementations we can just stop calling\nfile_update_time() when filesystem implements .page_mkwrite.\n\nTested-by: Kamal Mostafa \u003ckamal@canonical.com\u003e\nTested-by: Peter M. Petrakis \u003cpeter.petrakis@canonical.com\u003e\nTested-by: Dann Frazier \u003cdann.frazier@canonical.com\u003e\nTested-by: Massimo Morana \u003cmassimo.morana@canonical.com\u003e\nSigned-off-by: Jan Kara \u003cjack@suse.cz\u003e\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "4cb38750d49010ae72e718d46605ac9ba5a851b4",
      "tree": "8c991a900fd176288f4acbc340512b90d604374d",
      "parents": [
        "0a2fe19ccc4bc552a8083a595a3aa737b8bea727",
        "7efa1c87963d23cc57ba40c07316d3e28cc75a3a"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 26 13:17:17 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 26 13:17:17 2012 -0700"
      },
      "message": "Merge branch \u0027x86-mm-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip\n\nPull x86/mm changes from Peter Anvin:\n \"The big change here is the patchset by Alex Shi to use INVLPG to flush\n  only the affected pages when we only need to flush a small page range.\n\n  It also removes the special INVALIDATE_TLB_VECTOR interrupts (32\n  vectors!) and replace it with an ordinary IPI function call.\"\n\nFix up trivial conflicts in arch/x86/include/asm/apic.h (added code next\nto changed line)\n\n* \u0027x86-mm-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:\n  x86/tlb: Fix build warning and crash when building for !SMP\n  x86/tlb: do flush_tlb_kernel_range by \u0027invlpg\u0027\n  x86/tlb: replace INVALIDATE_TLB_VECTOR by CALL_FUNCTION_VECTOR\n  x86/tlb: enable tlb flush range support for x86\n  mm/mmu_gather: enable tlb flush range in generic mmu_gather\n  x86/tlb: add tlb_flushall_shift knob into debugfs\n  x86/tlb: add tlb_flushall_shift for specific CPU\n  x86/tlb: fall back to flush all when meet a THP large page\n  x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range\n  x86/tlb_info: get last level TLB entry number of CPU\n  x86: Add read_mostly declaration/definition to variables from smp.h\n  x86: Define early read-mostly per-cpu macros\n"
    },
    {
      "commit": "597e1c3580b7cfd95bb0f3167e2b297bf8a5a3ae",
      "tree": "d67c27b8505af6f7f21fa918599c2e9d37c2e5e1",
      "parents": [
        "3df3212f9722c7e45c723b9ea231a04ba4dbc47c"
      ],
      "author": {
        "name": "Alex Shi",
        "email": "alex.shi@intel.com",
        "time": "Thu Jun 28 09:02:21 2012 +0800"
      },
      "committer": {
        "name": "H. Peter Anvin",
        "email": "hpa@zytor.com",
        "time": "Wed Jun 27 19:29:11 2012 -0700"
      },
      "message": "mm/mmu_gather: enable tlb flush range in generic mmu_gather\n\nThis patch enabled the tlb flush range support in generic mmu layer.\n\nMost of arch has self tlb flush range support, like ARM/IA64 etc.\nX86 arch has no this support in hardware yet. But another instruction\n\u0027invlpg\u0027 can implement this function in some degree. So, enable this\nfeather in generic layer for x86 now. and maybe useful for other archs\nin further.\n\nGeneric mmu_gather struct is protected by micro\nHAVE_GENERIC_MMU_GATHER. Other archs that has flush range supported\nown self mmu_gather struct. So, now this change is safe for them.\n\nIn future we may unify this struct and related functions on multiple\narchs.\n\nThanks for Peter Zijlstra time and time reminder for multiple\narchitecture code safe!\n\nSigned-off-by: Alex Shi \u003calex.shi@intel.com\u003e\nLink: http://lkml.kernel.org/r/1340845344-27557-7-git-send-email-alex.shi@intel.com\nSigned-off-by: H. Peter Anvin \u003chpa@zytor.com\u003e\n"
    },
    {
      "commit": "eb4546bbbdb160aff084d50511165f385756af18",
      "tree": "c9c0b1f367ae4f2deea43f06081356613b2b6e3e",
      "parents": [
        "dad7557eb705688040aac134efa5418b66d5ed92"
      ],
      "author": {
        "name": "Randy Dunlap",
        "email": "rdunlap@xenotime.net",
        "time": "Wed Jun 20 12:53:02 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 20 14:39:36 2012 -0700"
      },
      "message": "mm/memory.c: fix kernel-doc warnings\n\nFix kernel-doc warnings in mm/memory.c:\n\n  Warning(mm/memory.c:1377): No description found for parameter \u0027start\u0027\n  Warning(mm/memory.c:1377): Excess function parameter \u0027address\u0027 description in \u0027zap_page_range\u0027\n\nSigned-off-by: Randy Dunlap \u003crdunlap@xenotime.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e0897d75f0b22e8c3a7287a48548c5686ef73447",
      "tree": "7c6e96b8f9e95ba81e322833363398df119102e0",
      "parents": [
        "436814e61f5c526ed123853a9bf63fb2ff4ff94b"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Jun 20 12:53:00 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 20 14:39:35 2012 -0700"
      },
      "message": "mm, thp: print useful information when mmap_sem is unlocked in zap_pmd_range\n\nAndrea asked for addr, end, vma-\u003evm_start, and vma-\u003evm_end to be emitted\nwhen !rwsem_is_locked(\u0026tlb-\u003emm-\u003emmap_sem).  Otherwise, debugging the\nunderlying issue is more difficult.\n\nSuggested-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-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": "1f1d06c34f7675026326cd9f39ff91e4555cf355",
      "tree": "b2493685179e3b222c915002648c3baba56318d2",
      "parents": [
        "bde8bd8a1d5242589ddcaef8e017b48b207c4729"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Tue May 29 15:06:23 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:19 2012 -0700"
      },
      "message": "thp, memcg: split hugepage for memcg oom on cow\n\nOn COW, a new hugepage is allocated and charged to the memcg.  If the\nsystem is oom or the charge to the memcg fails, however, the fault\nhandler will return VM_FAULT_OOM which results in an oom kill.\n\nInstead, it\u0027s possible to fallback to splitting the hugepage so that the\nCOW results only in an order-0 page being allocated and charged to the\nmemcg which has a higher liklihood to succeed.  This is expensive\nbecause the hugepage must be split in the page fault handler, but it is\nmuch better than unnecessarily oom killing a process.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: 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": "e709ffd6169ccd259eb5874e853303e91e94e829",
      "tree": "796b56c2507b8581492da73e354d651c9dd7076b",
      "parents": [
        "edad9d2c337d43278a9d5aeb0ed531c2e838f8a6"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Tue May 29 15:06:18 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 29 16:22:19 2012 -0700"
      },
      "message": "mm: remove swap token code\n\nThe swap token code no longer fits in with the current VM model.  It\ndoes not play well with cgroups or the better NUMA placement code in\ndevelopment, since we have only one swap token globally.\n\nIt also has the potential to mess with scalability of the system, by\nincreasing the number of non-reclaimable pages on the active and\ninactive anon LRU lists.\n\nLast but not least, the swap token code has been broken for a year\nwithout complaints, as reported by Konstantin Khlebnikov.  This suggests\nwe no longer have much use for it.\n\nThe days of sub-1G memory systems with heavy use of swap are over.  If\nwe ever need thrashing reducing code in the future, we will have to\nimplement something that does scale.\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Bob Picco \u003cbpicco@meloft.net\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": "654443e20dfc0617231f28a07c96a979ee1a0239",
      "tree": "a0dc3f093eb13892539082e663607c34b4fc2d07",
      "parents": [
        "2c01e7bc46f10e9190818437e564f7e0db875ae9",
        "9cba26e66d09bf394ae5a739627a1dc8b7cae6f4"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 24 11:39:34 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 24 11:39:34 2012 -0700"
      },
      "message": "Merge branch \u0027perf-uprobes-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip\n\nPull user-space probe instrumentation from Ingo Molnar:\n \"The uprobes code originates from SystemTap and has been used for years\n  in Fedora and RHEL kernels.  This version is much rewritten, reviews\n  from PeterZ, Oleg and myself shaped the end result.\n\n  This tree includes uprobes support in \u0027perf probe\u0027 - but SystemTap\n  (and other tools) can take advantage of user probe points as well.\n\n  Sample usage of uprobes via perf, for example to profile malloc()\n  calls without modifying user-space binaries.\n\n  First boot a new kernel with CONFIG_UPROBE_EVENT\u003dy enabled.\n\n  If you don\u0027t know which function you want to probe you can pick one\n  from \u0027perf top\u0027 or can get a list all functions that can be probed\n  within libc (binaries can be specified as well):\n\n\t$ perf probe -F -x /lib/libc.so.6\n\n  To probe libc\u0027s malloc():\n\n\t$ perf probe -x /lib64/libc.so.6 malloc\n\tAdded new event:\n\tprobe_libc:malloc    (on 0x7eac0)\n\n  You can now use it in all perf tools, such as:\n\n\tperf record -e probe_libc:malloc -aR sleep 1\n\n  Make use of it to create a call graph (as the flat profile is going to\n  look very boring):\n\n\t$ perf record -e probe_libc:malloc -gR make\n\t[ perf record: Woken up 173 times to write data ]\n\t[ perf record: Captured and wrote 44.190 MB perf.data (~1930712\n\n\t$ perf report | less\n\n\t  32.03%            git  libc-2.15.so   [.] malloc\n\t                    |\n\t                    --- malloc\n\n\t  29.49%            cc1  libc-2.15.so   [.] malloc\n\t                    |\n\t                    --- malloc\n\t                       |\n\t                       |--0.95%-- 0x208eb1000000000\n\t                       |\n\t                       |--0.63%-- htab_traverse_noresize\n\n\t  11.04%             as  libc-2.15.so   [.] malloc\n\t                     |\n\t                     --- malloc\n\t                        |\n\n\t   7.15%             ld  libc-2.15.so   [.] malloc\n\t                     |\n\t                     --- malloc\n\t                        |\n\n\t   5.07%             sh  libc-2.15.so   [.] malloc\n\t                     |\n\t                     --- malloc\n\t                        |\n\t   4.99%  python-config  libc-2.15.so   [.] malloc\n\t          |\n\t          --- malloc\n\t             |\n\t   4.54%           make  libc-2.15.so   [.] malloc\n\t                   |\n\t                   --- malloc\n\t                      |\n\t                      |--7.34%-- glob\n\t                      |          |\n\t                      |          |--93.18%-- 0x41588f\n\t                      |          |\n\t                      |           --6.82%-- glob\n\t                      |                     0x41588f\n\n\t   ...\n\n  Or:\n\n\t$ perf report -g flat | less\n\n\t# Overhead        Command  Shared Object      Symbol\n\t# ........  .............  .............  ..........\n\t#\n\t  32.03%            git  libc-2.15.so   [.] malloc\n\t          27.19%\n\t              malloc\n\n\t  29.49%            cc1  libc-2.15.so   [.] malloc\n\t          24.77%\n\t              malloc\n\n\t  11.04%             as  libc-2.15.so   [.] malloc\n\t          11.02%\n\t              malloc\n\n\t   7.15%             ld  libc-2.15.so   [.] malloc\n\t           6.57%\n\t              malloc\n\n\t ...\n\n  The core uprobes design is fairly straightforward: uprobes probe\n  points register themselves at (inode:offset) addresses of\n  libraries/binaries, after which all existing (or new) vmas that map\n  that address will have a software breakpoint injected at that address.\n  vmas are COW-ed to preserve original content.  The probe points are\n  kept in an rbtree.\n\n  If user-space executes the probed inode:offset instruction address\n  then an event is generated which can be recovered from the regular\n  perf event channels and mmap-ed ring-buffer.\n\n  Multiple probes at the same address are supported, they create a\n  dynamic callback list of event consumers.\n\n  The basic model is further complicated by the XOL speedup: the\n  original instruction that is probed is copied (in an architecture\n  specific fashion) and executed out of line when the probe triggers.\n  The XOL area is a single vma per process, with a fixed number of\n  entries (which limits probe execution parallelism).\n\n  The API: uprobes are installed/removed via\n  /sys/kernel/debug/tracing/uprobe_events, the API is integrated to\n  align with the kprobes interface as much as possible, but is separate\n  to it.\n\n  Injecting a probe point is privileged operation, which can be relaxed\n  by setting perf_paranoid to -1.\n\n  You can use multiple probes as well and mix them with kprobes and\n  regular PMU events or tracepoints, when instrumenting a task.\"\n\nFix up trivial conflicts in mm/memory.c due to previous cleanup of\nunmap_single_vma().\n\n* \u0027perf-uprobes-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)\n  perf probe: Detect probe target when m/x options are absent\n  perf probe: Provide perf interface for uprobes\n  tracing: Fix kconfig warning due to a typo\n  tracing: Provide trace events interface for uprobes\n  tracing: Extract out common code for kprobes/uprobes trace events\n  tracing: Modify is_delete, is_return from int to bool\n  uprobes/core: Decrement uprobe count before the pages are unmapped\n  uprobes/core: Make background page replacement logic account for rss_stat counters\n  uprobes/core: Optimize probe hits with the help of a counter\n  uprobes/core: Allocate XOL slots for uprobes use\n  uprobes/core: Handle breakpoint and singlestep exceptions\n  uprobes/core: Rename bkpt to swbp\n  uprobes/core: Make order of function parameters consistent across functions\n  uprobes/core: Make macro names consistent\n  uprobes: Update copyright notices\n  uprobes/core: Move insn to arch specific structure\n  uprobes/core: Remove uprobe_opcode_sz\n  uprobes/core: Make instruction tables volatile\n  uprobes: Move to kernel/events/\n  uprobes/core: Clean up, refactor and improve the code\n  ...\n"
    },
    {
      "commit": "4f74d2c8e827af12596f153a564c868bf6dbe3dd",
      "tree": "6ef2bafd6c23a4c4a9ef716ea530daea824a7721",
      "parents": [
        "7e027b14d53e9729f823ba8652095d1e309aa8e9"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun May 06 13:54:06 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun May 06 14:05:17 2012 -0700"
      },
      "message": "vm: remove \u0027nr_accounted\u0027 calculations from the unmap_vmas() interfaces\n\nThe VM accounting makes no sense at this level, and half of the callers\ndidn\u0027t ever actually use the end result.  The only time we want to\nunaccount the memory is when we actually remove the vma, so do the\naccounting at that point instead.\n\nThis simplifies the interfaces (no need to pass down that silly page\ncounter to functions that really don\u0027t care), and also makes it much\nmore obvious what is actually going on: we do vm_[un]acct_memory() when\nadding or removing the vma, not on random page walking.\n\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7e027b14d53e9729f823ba8652095d1e309aa8e9",
      "tree": "a706e9f6ac67d92e4df18662cdb0205844a17871",
      "parents": [
        "18b15fcde715a5512671af9d72a76e7f6d7cb6f0"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun May 06 13:43:15 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun May 06 13:52:07 2012 -0700"
      },
      "message": "vm: simplify unmap_vmas() calling convention\n\nNone of the callers want to pass in \u0027zap_details\u0027, and it doesn\u0027t even\nmake sense for the case of actually unmapping vma\u0027s.  So remove the\nargument, and clean up the interface.\n\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cbc91f71b51b8335f1fc7ccfca8011f31a717367",
      "tree": "31bc32a4ee512c9056c93e8c46d58bc217d31bc2",
      "parents": [
        "7396fa818d6278694a44840f389ddc40a3269a9a"
      ],
      "author": {
        "name": "Srikar Dronamraju",
        "email": "srikar@linux.vnet.ibm.com",
        "time": "Wed Apr 11 16:05:27 2012 +0530"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Sat Apr 14 13:25:48 2012 +0200"
      },
      "message": "uprobes/core: Decrement uprobe count before the pages are unmapped\n\nUprobes has a callback (uprobe_munmap()) in the unmap path to\nmaintain the uprobes count.\n\nIn the exit path this callback gets called in unlink_file_vma().\nHowever by the time unlink_file_vma() is called, the pages would\nhave been unmapped (in unmap_vmas()) and the task-\u003erss_stat counts\naccounted (in zap_pte_range()).\n\nIf the exiting process has probepoints, uprobe_munmap() checks if\nthe breakpoint instruction was around before decrementing the probe\ncount.\n\nThis results in a file backed page being reread by uprobe_munmap()\nand hence it does not find the breakpoint.\n\nThis patch fixes this problem by moving the callback to\nunmap_single_vma(). Since unmap_single_vma() may not unmap the\ncomplete vma, add start and end parameters to uprobe_munmap().\n\nThis bug became apparent courtesy of commit c3f0327f8e9d\n(\"mm: add rss counters consistency check\").\n\nSigned-off-by: Srikar Dronamraju \u003csrikar@linux.vnet.ibm.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Ananth N Mavinakayanahalli \u003cananth@in.ibm.com\u003e\nCc: Jim Keniston \u003cjkenisto@linux.vnet.ibm.com\u003e\nCc: Linux-mm \u003clinux-mm@kvack.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Andi Kleen \u003candi@firstfloor.org\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Arnaldo Carvalho de Melo \u003cacme@infradead.org\u003e\nCc: Masami Hiramatsu \u003cmasami.hiramatsu.pt@hitachi.com\u003e\nCc: Anton Arapov \u003canton@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nLink: http://lkml.kernel.org/r/20120411103527.23245.9835.sendpatchset@srdronam.in.ibm.com\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "909af768e88867016f427264ae39d27a57b6a8ed",
      "tree": "5068b4d98e4bedecde89d9113dc7ef8c69633f45",
      "parents": [
        "1cc684ab75123efe7ff446eb821d44375ba8fa30"
      ],
      "author": {
        "name": "Jason Baron",
        "email": "jbaron@redhat.com",
        "time": "Fri Mar 23 15:02:51 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 23 16:58:42 2012 -0700"
      },
      "message": "coredump: remove VM_ALWAYSDUMP flag\n\nThe motivation for this patchset was that I was looking at a way for a\nqemu-kvm process, to exclude the guest memory from its core dump, which\ncan be quite large.  There are already a number of filter flags in\n/proc/\u003cpid\u003e/coredump_filter, however, these allow one to specify \u0027types\u0027\nof kernel memory, not specific address ranges (which is needed in this\ncase).\n\nSince there are no more vma flags available, the first patch eliminates\nthe need for the \u0027VM_ALWAYSDUMP\u0027 flag.  The flag is used internally by\nthe kernel to mark vdso and vsyscall pages.  However, it is simple\nenough to check if a vma covers a vdso or vsyscall page without the need\nfor this flag.\n\nThe second patch then replaces the \u0027VM_ALWAYSDUMP\u0027 flag with a new\n\u0027VM_NODUMP\u0027 flag, which can be set by userspace using new madvise flags:\n\u0027MADV_DONTDUMP\u0027, and unset via \u0027MADV_DODUMP\u0027.  The core dump filters\ncontinue to work the same as before unless \u0027MADV_DONTDUMP\u0027 is set on the\nregion.\n\nThe qemu code which implements this features is at:\n\n  http://people.redhat.com/~jbaron/qemu-dump/qemu-dump.patch\n\nIn my testing the qemu core dump shrunk from 383MB -\u003e 13MB with this\npatch.\n\nI also believe that the \u0027MADV_DONTDUMP\u0027 flag might be useful for\nsecurity sensitive apps, which might want to select which areas are\ndumped.\n\nThis patch:\n\nThe VM_ALWAYSDUMP flag is currently used by the coredump code to\nindicate that a vma is part of a vsyscall or vdso section.  However, we\ncan determine if a vma is in one these sections by checking it against\nthe gate_vma and checking for a non-NULL return value from\narch_vma_name().  Thus, freeing a valuable vma bit.\n\nSigned-off-by: Jason Baron \u003cjbaron@redhat.com\u003e\nAcked-by: Roland McGrath \u003croland@hack.frob.com\u003e\nCc: Chris Metcalf \u003ccmetcalf@tilera.com\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "95211279c5ad00a317c98221d7e4365e02f20836",
      "tree": "2ddc8625378d2915b8c96392f3cf6663b705ed55",
      "parents": [
        "5375871d432ae9fc581014ac117b96aaee3cd0c7",
        "12724850e8064f64b6223d26d78c0597c742c65a"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 22 09:04:48 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 22 09:04:48 2012 -0700"
      },
      "message": "Merge branch \u0027akpm\u0027 (Andrew\u0027s patch-bomb)\n\nMerge first batch of patches from Andrew Morton:\n \"A few misc things and all the MM queue\"\n\n* emailed from Andrew Morton \u003cakpm@linux-foundation.org\u003e: (92 commits)\n  memcg: avoid THP split in task migration\n  thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE\n  memcg: clean up existing move charge code\n  mm/memcontrol.c: remove unnecessary \u0027break\u0027 in mem_cgroup_read()\n  mm/memcontrol.c: remove redundant BUG_ON() in mem_cgroup_usage_unregister_event()\n  mm/memcontrol.c: s/stealed/stolen/\n  memcg: fix performance of mem_cgroup_begin_update_page_stat()\n  memcg: remove PCG_FILE_MAPPED\n  memcg: use new logic for page stat accounting\n  memcg: remove PCG_MOVE_LOCK flag from page_cgroup\n  memcg: simplify move_account() check\n  memcg: remove EXPORT_SYMBOL(mem_cgroup_update_page_stat)\n  memcg: kill dead prev_priority stubs\n  memcg: remove PCG_CACHE page_cgroup flag\n  memcg: let css_get_next() rely upon rcu_read_lock()\n  cgroup: revert ss_id_lock to spinlock\n  idr: make idr_get_next() good for rcu_read_lock()\n  memcg: remove unnecessary thp check in page stat accounting\n  memcg: remove redundant returns\n  memcg: enum lru_list lru\n  ...\n"
    },
    {
      "commit": "ea48cf7863c789579b170ef28e7fc62728365d6e",
      "tree": "3602d07d69e1b1b6d8a26f2b221705bb2862ee3c",
      "parents": [
        "05af2e104a0c282dcd9303431e1360750ba76de6"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:34:13 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:59 2012 -0700"
      },
      "message": "mm, counters: fold __sync_task_rss_stat() into sync_mm_rss()\n\nThere\u0027s no difference between sync_mm_rss() and __sync_task_rss_stat(),\nso fold the latter into the former.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "05af2e104a0c282dcd9303431e1360750ba76de6",
      "tree": "cdd5876f2d17b26cc3ded7ef85d04d0e853e9b7e",
      "parents": [
        "90481622d75715bfcb68501280a917dbfe516029"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Wed Mar 21 16:34:13 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:59 2012 -0700"
      },
      "message": "mm, counters: remove task argument to sync_mm_rss() and __sync_task_rss_stat()\n\nsync_mm_rss() can only be used for current to avoid race conditions in\niterating and clearing its per-task counters.  Remove the task argument\nfor it and its helper function, __sync_task_rss_stat(), to avoid thinking\nit can be used safely for anything other than current.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "69c978232aaa99476f9bd002c2a29a84fa3779b5",
      "tree": "7edb0da034b8824040f4f7327dd31ad260532167",
      "parents": [
        "6131728914810a6c02e08750e13e45870101e862"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Wed Mar 21 16:33:49 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:55 2012 -0700"
      },
      "message": "mm: make get_mm_counter static-inline\n\nMake get_mm_counter() always static inline, it is simple enough for that.\nAnd remove unused set_mm_counter()\n\nbloat-o-meter:\n\nadd/remove: 0/1 grow/shrink: 4/12 up/down: 99/-341 (-242)\nfunction                                     old     new   delta\ntry_to_unmap_one                             886     952     +66\nsys_remap_file_pages                        1214    1230     +16\ndup_mm                                      1684    1700     +16\ndo_exit                                     2277    2278      +1\nzap_page_range                               208     205      -3\nunmap_region                                 304     296      -8\nstatic.oom_kill_process                      554     546      -8\ntry_to_unmap_file                           1716    1700     -16\ngetrusage                                    925     909     -16\nflush_old_exec                              1704    1688     -16\nstatic.dump_header                           416     390     -26\nacct_update_integrals                        218     187     -31\ndo_task_stat                                2986    2954     -32\nget_mm_counter                                34       -     -34\nxacct_add_tsk                                371     334     -37\ntask_statm                                   172     118     -54\ntask_mem                                     383     323     -60\n\ntry_to_unmap_one() grows because update_hiwater_rss() now completely inline.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Kirill A. Shutemov \u003ckirill@shutemov.name\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1a5a9906d4e8d1976b701f889d8f35d54b928f25",
      "tree": "e51912e725f224663a738045a4d0528d08da4572",
      "parents": [
        "31f6765266417c0d99f0e922fe82848a7c9c2ae9"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Wed Mar 21 16:33:42 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 17:54:54 2012 -0700"
      },
      "message": "mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode\n\nIn some cases it may happen that pmd_none_or_clear_bad() is called with\nthe mmap_sem hold in read mode.  In those cases the huge page faults can\nallocate hugepmds under pmd_none_or_clear_bad() and that can trigger a\nfalse positive from pmd_bad() that will not like to see a pmd\nmaterializing as trans huge.\n\nIt\u0027s not khugepaged causing the problem, khugepaged holds the mmap_sem\nin write mode (and all those sites must hold the mmap_sem in read mode\nto prevent pagetables to go away from under them, during code review it\nseems vm86 mode on 32bit kernels requires that too unless it\u0027s\nrestricted to 1 thread per process or UP builds).  The race is only with\nthe huge pagefaults that can convert a pmd_none() into a\npmd_trans_huge().\n\nEffectively all these pmd_none_or_clear_bad() sites running with\nmmap_sem in read mode are somewhat speculative with the page faults, and\nthe result is always undefined when they run simultaneously.  This is\nprobably why it wasn\u0027t common to run into this.  For example if the\nmadvise(MADV_DONTNEED) runs zap_page_range() shortly before the page\nfault, the hugepage will not be zapped, if the page fault runs first it\nwill be zapped.\n\nAltering pmd_bad() not to error out if it finds hugepmds won\u0027t be enough\nto fix this, because zap_pmd_range would then proceed to call\nzap_pte_range (which would be incorrect if the pmd become a\npmd_trans_huge()).\n\nThe simplest way to fix this is to read the pmd in the local stack\n(regardless of what we read, no need of actual CPU barriers, only\ncompiler barrier needed), and be sure it is not changing under the code\nthat computes its value.  Even if the real pmd is changing under the\nvalue we hold on the stack, we don\u0027t care.  If we actually end up in\nzap_pte_range it means the pmd was not none already and it was not huge,\nand it can\u0027t become huge from under us (khugepaged locking explained\nabove).\n\nAll we need is to enforce that there is no way anymore that in a code\npath like below, pmd_trans_huge can be false, but pmd_none_or_clear_bad\ncan run into a hugepmd.  The overhead of a barrier() is just a compiler\ntweak and should not be measurable (I only added it for THP builds).  I\ndon\u0027t exclude different compiler versions may have prevented the race\ntoo by caching the value of *pmd on the stack (that hasn\u0027t been\nverified, but it wouldn\u0027t be impossible considering\npmd_none_or_clear_bad, pmd_bad, pmd_trans_huge, pmd_none are all inlines\nand there\u0027s no external function called in between pmd_trans_huge and\npmd_none_or_clear_bad).\n\n\t\tif (pmd_trans_huge(*pmd)) {\n\t\t\tif (next-addr !\u003d HPAGE_PMD_SIZE) {\n\t\t\t\tVM_BUG_ON(!rwsem_is_locked(\u0026tlb-\u003emm-\u003emmap_sem));\n\t\t\t\tsplit_huge_page_pmd(vma-\u003evm_mm, pmd);\n\t\t\t} else if (zap_huge_pmd(tlb, vma, pmd, addr))\n\t\t\t\tcontinue;\n\t\t\t/* fall through */\n\t\t}\n\t\tif (pmd_none_or_clear_bad(pmd))\n\nBecause this race condition could be exercised without special\nprivileges this was reported in CVE-2012-1179.\n\nThe race was identified and fully explained by Ulrich who debugged it.\nI\u0027m quoting his accurate explanation below, for reference.\n\n\u003d\u003d\u003d\u003d\u003d\u003d start quote \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n      mapcount 0 page_mapcount 1\n      kernel BUG at mm/huge_memory.c:1384!\n\n    At some point prior to the panic, a \"bad pmd ...\" message similar to the\n    following is logged on the console:\n\n      mm/memory.c:145: bad pmd ffff8800376e1f98(80000000314000e7).\n\n    The \"bad pmd ...\" message is logged by pmd_clear_bad() before it clears\n    the page\u0027s PMD table entry.\n\n        143 void pmd_clear_bad(pmd_t *pmd)\n        144 {\n    -\u003e  145         pmd_ERROR(*pmd);\n        146         pmd_clear(pmd);\n        147 }\n\n    After the PMD table entry has been cleared, there is an inconsistency\n    between the actual number of PMD table entries that are mapping the page\n    and the page\u0027s map count (_mapcount field in struct page). When the page\n    is subsequently reclaimed, __split_huge_page() detects this inconsistency.\n\n       1381         if (mapcount !\u003d page_mapcount(page))\n       1382                 printk(KERN_ERR \"mapcount %d page_mapcount %d\\n\",\n       1383                        mapcount, page_mapcount(page));\n    -\u003e 1384         BUG_ON(mapcount !\u003d page_mapcount(page));\n\n    The root cause of the problem is a race of two threads in a multithreaded\n    process. Thread B incurs a page fault on a virtual address that has never\n    been accessed (PMD entry is zero) while Thread A is executing an madvise()\n    system call on a virtual address within the same 2 MB (huge page) range.\n\n               virtual address space\n              .---------------------.\n              |                     |\n              |                     |\n            .-|---------------------|\n            | |                     |\n            | |                     |\u003c-- B(fault)\n            | |                     |\n      2 MB  | |/////////////////////|-.\n      huge \u003c  |/////////////////////|  \u003e A(range)\n      page  | |/////////////////////|-\u0027\n            | |                     |\n            | |                     |\n            \u0027-|---------------------|\n              |                     |\n              |                     |\n              \u0027---------------------\u0027\n\n    - Thread A is executing an madvise(..., MADV_DONTNEED) system call\n      on the virtual address range \"A(range)\" shown in the picture.\n\n    sys_madvise\n      // Acquire the semaphore in shared mode.\n      down_read(\u0026current-\u003emm-\u003emmap_sem)\n      ...\n      madvise_vma\n        switch (behavior)\n        case MADV_DONTNEED:\n             madvise_dontneed\n               zap_page_range\n                 unmap_vmas\n                   unmap_page_range\n                     zap_pud_range\n                       zap_pmd_range\n                         //\n                         // Assume that this huge page has never been accessed.\n                         // I.e. content of the PMD entry is zero (not mapped).\n                         //\n                         if (pmd_trans_huge(*pmd)) {\n                             // We don\u0027t get here due to the above assumption.\n                         }\n                         //\n                         // Assume that Thread B incurred a page fault and\n             .---------\u003e // sneaks in here as shown below.\n             |           //\n             |           if (pmd_none_or_clear_bad(pmd))\n             |               {\n             |                 if (unlikely(pmd_bad(*pmd)))\n             |                     pmd_clear_bad\n             |                     {\n             |                       pmd_ERROR\n             |                         // Log \"bad pmd ...\" message here.\n             |                       pmd_clear\n             |                         // Clear the page\u0027s PMD entry.\n             |                         // Thread B incremented the map count\n             |                         // in page_add_new_anon_rmap(), but\n             |                         // now the page is no longer mapped\n             |                         // by a PMD entry (-\u003e inconsistency).\n             |                     }\n             |               }\n             |\n             v\n    - Thread B is handling a page fault on virtual address \"B(fault)\" shown\n      in the picture.\n\n    ...\n    do_page_fault\n      __do_page_fault\n        // Acquire the semaphore in shared mode.\n        down_read_trylock(\u0026mm-\u003emmap_sem)\n        ...\n        handle_mm_fault\n          if (pmd_none(*pmd) \u0026\u0026 transparent_hugepage_enabled(vma))\n              // We get here due to the above assumption (PMD entry is zero).\n              do_huge_pmd_anonymous_page\n                alloc_hugepage_vma\n                  // Allocate a new transparent huge page here.\n                ...\n                __do_huge_pmd_anonymous_page\n                  ...\n                  spin_lock(\u0026mm-\u003epage_table_lock)\n                  ...\n                  page_add_new_anon_rmap\n                    // Here we increment the page\u0027s map count (starts at -1).\n                    atomic_set(\u0026page-\u003e_mapcount, 0)\n                  set_pmd_at\n                    // Here we set the page\u0027s PMD entry which will be cleared\n                    // when Thread A calls pmd_clear_bad().\n                  ...\n                  spin_unlock(\u0026mm-\u003epage_table_lock)\n\n    The mmap_sem does not prevent the race because both threads are acquiring\n    it in shared mode (down_read).  Thread B holds the page_table_lock while\n    the page\u0027s map count and PMD table entry are updated.  However, Thread A\n    does not synchronize on that lock.\n\n\u003d\u003d\u003d\u003d\u003d\u003d end quote \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n[akpm@linux-foundation.org: checkpatch fixes]\nReported-by: Ulrich Obergfell \u003cuobergfe@redhat.com\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Dave Jones \u003cdavej@redhat.com\u003e\nAcked-by: Larry Woodman \u003clwoodman@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\t\t[2.6.38+]\nCc: Mark Salter \u003cmsalter@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": "3a990a52f9f25f45469e272017a31e7a3fda60ed",
      "tree": "366f639d9ce1e907b65caa72bc098df6c4b5a240",
      "parents": [
        "3556485f1595e3964ba539e39ea682acbb835cee",
        "f5cc4eef9987d0b517364d01e290d6438e47ee5d"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 13:32:19 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 21 13:32:19 2012 -0700"
      },
      "message": "Merge branch \u0027vm\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs\n\nPull munmap/truncate race fixes from Al Viro:\n \"Fixes for racy use of unmap_vmas() on truncate-related codepaths\"\n\n* \u0027vm\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:\n  VM: make zap_page_range() callers that act on a single VMA use separate helper\n  VM: make unmap_vmas() return void\n  VM: don\u0027t bother with feeding upper limit to tlb_finish_mmu() in exit_mmap()\n  VM: make zap_page_range() return void\n  VM: can\u0027t go through the inner loop in unmap_vmas() more than once...\n  VM: unmap_page_range() can return void\n"
    },
    {
      "commit": "f5cc4eef9987d0b517364d01e290d6438e47ee5d",
      "tree": "1c6a5ec2abf40450b89134564c35c0beafded436",
      "parents": [
        "6e8bb0193af3f308ef22817a5560422d33e58b90"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Mon Mar 05 14:14:20 2012 -0500"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Tue Mar 20 21:39:51 2012 -0400"
      },
      "message": "VM: make zap_page_range() callers that act on a single VMA use separate helper\n\n... and not rely on -\u003evm_next being there for them...\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "6e8bb0193af3f308ef22817a5560422d33e58b90",
      "tree": "6001421c8d389bd00b18e0510e3f6c9130f9f80b",
      "parents": [
        "853f5e264018113b1f96f05551b07a74b836c7fc"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Mon Mar 05 13:41:15 2012 -0500"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Tue Mar 20 21:39:51 2012 -0400"
      },
      "message": "VM: make unmap_vmas() return void\n\nsame story - nobody uses it and it\u0027s been pointless since\n\"mm: Remove i_mmap_lock lockbreak\" went in.\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "14f5ff5df37a8fabe2d25b1e64df7e010cc87db9",
      "tree": "10f46ad8429790de35ebad33631d435f74aaff0e",
      "parents": [
        "8b2a12382ccc9df31b27dac37fe04dffe088b57c"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Mon Mar 05 13:38:09 2012 -0500"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Tue Mar 20 21:39:50 2012 -0400"
      },
      "message": "VM: make zap_page_range() return void\n\n... since all callers ignore its return value and it\u0027s been\nuseless since commit 97a894136f29802da19a15541de3c019e1ca147e\n(mm: Remove i_mmap_lock lockbreak) anyway.\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "8b2a12382ccc9df31b27dac37fe04dffe088b57c",
      "tree": "77e79b540a288b3c2bce78bfd7aff4c58511ecd1",
      "parents": [
        "038c7aa16a38059ac23dfe9caa6954226ea20728"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Mon Mar 05 13:35:49 2012 -0500"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Tue Mar 20 21:39:50 2012 -0400"
      },
      "message": "VM: can\u0027t go through the inner loop in unmap_vmas() more than once...\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "038c7aa16a38059ac23dfe9caa6954226ea20728",
      "tree": "b851af73694ff7e0cd69ce90c7506c82122215c1",
      "parents": [
        "c16fa4f2ad19908a47c63d8fa436a1178438c7e7"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Mon Mar 05 13:25:09 2012 -0500"
      },
      "committer": {
        "name": "Al Viro",
        "email": "viro@zeniv.linux.org.uk",
        "time": "Tue Mar 20 21:39:50 2012 -0400"
      },
      "message": "VM: unmap_page_range() can return void\n\nreturn value is always the 4th (\u0027end\u0027) argument.\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n"
    },
    {
      "commit": "9b04c5fec43c0da610a2c37f70c5b013101a6ad7",
      "tree": "f04767281b7067fba91cf0d37440bf454c492e38",
      "parents": [
        "c3eede8e0a1292d95c051cf947738687b9c42322"
      ],
      "author": {
        "name": "Cong Wang",
        "email": "amwang@redhat.com",
        "time": "Fri Nov 25 23:14:39 2011 +0800"
      },
      "committer": {
        "name": "Cong Wang",
        "email": "xiyou.wangcong@gmail.com",
        "time": "Tue Mar 20 21:48:27 2012 +0800"
      },
      "message": "mm: remove the second argument of k[un]map_atomic()\n\nSigned-off-by: Cong Wang \u003camwang@redhat.com\u003e\n"
    },
    {
      "commit": "9f9f1acd713d69fae2af286fbeedc6c8963411c6",
      "tree": "cfa1485d01cb36c720f1e2b96b21748acc10ec06",
      "parents": [
        "245132643e1cfcd145bbc86a716c1818371fcb93"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Fri Jan 20 14:34:24 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jan 23 08:38:49 2012 -0800"
      },
      "message": "mm: fix rss count leakage during migration\n\nMemory migration fills a pte with a migration entry and it doesn\u0027t\nupdate the rss counters.  Then it replaces the migration entry with the\nnew page (or the old one if migration failed).  But between these two\npasses this pte can be unmaped, or a task can fork a child and it will\nget a copy of this migration entry.  Nobody accounts for this in the rss\ncounters.\n\nThis patch properly adjust rss counters for migration entries in\nzap_pte_range() and copy_one_pte().  Thus we avoid extra atomic\noperations on the migration fast-path.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nCc: Hugh Dickins \u003chughd@google.com\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": "f21760b15dcd091e5afd38d0b97197b45f7ef2ea",
      "tree": "84dd0f9016b46630d6b67e48ff0382b78a1bc519",
      "parents": [
        "e5591307f0c1eb733d280a0b72473e01d7f88530"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shaohua.li@intel.com",
        "time": "Thu Jan 12 17:19:16 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 12 20:13:08 2012 -0800"
      },
      "message": "thp: add tlb_remove_pmd_tlb_entry\n\nWe have tlb_remove_tlb_entry to indicate a pte tlb flush entry should be\nflushed, but not a corresponding API for pmd entry.  This isn\u0027t a\nproblem so far because THP is only for x86 currently and tlb_flush()\nunder x86 will flush entire TLB.  But this is confusion and could be\nmissed if thp is ported to other arch.\n\nAlso convert tlb-\u003eneed_flush \u003d 1 to a VM_BUG_ON(!tlb-\u003eneed_flush) in\n__tlb_remove_page() as suggested by Andrea Arcangeli.  The\n__tlb_remove_page() function is supposed to be called after\ntlb_remove_xxx_tlb_entry() and we can catch any misuse.\n\nSigned-off-by: Shaohua Li \u003cshaohua.li@intel.com\u003e\nReviewed-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "32aaeffbd4a7457bf2f7448b33b5946ff2a960eb",
      "tree": "faf7ad871d87176423ff9ed1d1ba4d9c688fc23f",
      "parents": [
        "208bca0860406d16398145ddd950036a737c3c9d",
        "67b84999b1a8b1af5625b1eabe92146c5eb42932"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 19:44:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Nov 06 19:44:47 2011 -0800"
      },
      "message": "Merge branch \u0027modsplit-Oct31_2011\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux\n\n* \u0027modsplit-Oct31_2011\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)\n  Revert \"tracing: Include module.h in define_trace.h\"\n  irq: don\u0027t put module.h into irq.h for tracking irqgen modules.\n  bluetooth: macroize two small inlines to avoid module.h\n  ip_vs.h: fix implicit use of module_get/module_put from module.h\n  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence\n  include: replace linux/module.h with \"struct module\" wherever possible\n  include: convert various register fcns to macros to avoid include chaining\n  crypto.h: remove unused crypto_tfm_alg_modname() inline\n  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE\n  pm_runtime.h: explicitly requires notifier.h\n  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h\n  miscdevice.h: fix up implicit use of lists and types\n  stop_machine.h: fix implicit use of smp.h for smp_processor_id\n  of: fix implicit use of errno.h in include/linux/of.h\n  of_platform.h: delete needless include \u003clinux/module.h\u003e\n  acpi: remove module.h include from platform/aclinux.h\n  miscdevice.h: delete unnecessary inclusion of module.h\n  device_cgroup.h: delete needless include \u003clinux/module.h\u003e\n  net: sch_generic remove redundant use of \u003clinux/module.h\u003e\n  net: inet_timewait_sock doesnt need \u003clinux/module.h\u003e\n  ...\n\nFix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in\n - drivers/media/dvb/frontends/dibx000_common.c\n - drivers/media/video/{mt9m111.c,ov6650.c}\n - drivers/mfd/ab3550-core.c\n - include/linux/dmaengine.h\n"
    },
    {
      "commit": "70b50f94f1644e2aa7cb374819cfd93f3c28d725",
      "tree": "79198cd9a92600140827a670d1ed5eefdcd23d79",
      "parents": [
        "994c0e992522c123298b4a91b72f5e67ba2d1123"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Wed Nov 02 13:36:59 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Nov 02 16:06:57 2011 -0700"
      },
      "message": "mm: thp: tail page refcounting fix\n\nMichel while working on the working set estimation code, noticed that\ncalling get_page_unless_zero() on a random pfn_to_page(random_pfn)\nwasn\u0027t safe, if the pfn ended up being a tail page of a transparent\nhugepage under splitting by __split_huge_page_refcount().\n\nHe then found the problem could also theoretically materialize with\npage_cache_get_speculative() during the speculative radix tree lookups\nthat uses get_page_unless_zero() in SMP if the radix tree page is freed\nand reallocated and get_user_pages is called on it before\npage_cache_get_speculative has a chance to call get_page_unless_zero().\n\nSo the best way to fix the problem is to keep page_tail-\u003e_count zero at\nall times.  This will guarantee that get_page_unless_zero() can never\nsucceed on any tail page.  page_tail-\u003e_mapcount is guaranteed zero and\nis unused for all tail pages of a compound page, so we can simply\naccount the tail page references there and transfer them to\ntail_page-\u003e_count in __split_huge_page_refcount() (in addition to the\nhead_page-\u003e_mapcount).\n\nWhile debugging this s/_count/_mapcount/ change I also noticed get_page is\ncalled by direct-io.c on pages returned by get_user_pages.  That wasn\u0027t\nentirely safe because the two atomic_inc in get_page weren\u0027t atomic.  As\nopposed to other get_user_page users like secondary-MMU page fault to\nestablish the shadow pagetables would never call any superflous get_page\nafter get_user_page returns.  It\u0027s safer to make get_page universally safe\nfor tail pages and to use get_page_foll() within follow_page (inside\nget_user_pages()).  get_page_foll() is safe to do the refcounting for tail\npages without taking any locks because it is run within PT lock protected\ncritical sections (PT lock for pte and page_table_lock for\npmd_trans_huge).\n\nThe standard get_page() as invoked by direct-io instead will now take\nthe compound_lock but still only for tail pages.  The direct-io paths\nare usually I/O bound and the compound_lock is per THP so very\nfinegrined, so there\u0027s no risk of scalability issues with it.  A simple\ndirect-io benchmarks with all lockdep prove locking and spinlock\ndebugging infrastructure enabled shows identical performance and no\noverhead.  So it\u0027s worth it.  Ideally direct-io should stop calling\nget_page() on pages returned by get_user_pages().  The spinlock in\nget_page() is already optimized away for no-THP builds but doing\nget_page() on tail pages returned by GUP is generally a rare operation\nand usually only run in I/O paths.\n\nThis new refcounting on page_tail-\u003e_mapcount in addition to avoiding new\nRCU critical sections will also allow the working set estimation code to\nwork without any further complexity associated to the tail page\nrefcounting with THP.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReported-by: Michel Lespinasse \u003cwalken@google.com\u003e\nReviewed-by: Michel Lespinasse \u003cwalken@google.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Johannes Weiner \u003cjweiner@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: David Gibson \u003cdavid@gibson.dropbear.id.au\u003e\nCc: \u003cstable@kernel.org\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": "b95f1b31b75588306e32b2afd32166cad48f670b",
      "tree": "b5496144e41b117cfe5ae70b145b5351709ec4d0",
      "parents": [
        "b9e15bafdf1aa20791cdefdcbf1ccf7d7aa03aaa"
      ],
      "author": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Sun Oct 16 02:01:52 2011 -0400"
      },
      "committer": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon Oct 31 09:20:12 2011 -0400"
      },
      "message": "mm: Map most files to use export.h instead of module.h\n\nThe files changed within are only using the EXPORT_SYMBOL\nmacro variants.  They are not using core modular infrastructure\nand hence don\u0027t need module.h but only the export.h header.\n\nSigned-off-by: Paul Gortmaker \u003cpaul.gortmaker@windriver.com\u003e\n"
    },
    {
      "commit": "2efaca927f5cd7ecd0f1554b8f9b6a9a2c329c03",
      "tree": "1bea042a7c712e861d7734db59b3311375c439c3",
      "parents": [
        "72c4783210f77fd743f0a316858d33f27db51e7c"
      ],
      "author": {
        "name": "Benjamin Herrenschmidt",
        "email": "benh@kernel.crashing.org",
        "time": "Mon Jul 25 17:12:32 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jul 25 20:57:11 2011 -0700"
      },
      "message": "mm/futex: fix futex writes on archs with SW tracking of dirty \u0026 young\n\nI haven\u0027t reproduced it myself but the fail scenario is that on such\nmachines (notably ARM and some embedded powerpc), if you manage to hit\nthat futex path on a writable page whose dirty bit has gone from the PTE,\nyou\u0027ll livelock inside the kernel from what I can tell.\n\nIt will go in a loop of trying the atomic access, failing, trying gup to\n\"fix it up\", getting succcess from gup, go back to the atomic access,\nfailing again because dirty wasn\u0027t fixed etc...\n\nSo I think you essentially hang in the kernel.\n\nThe scenario is probably rare\u0027ish because affected architecture are\nembedded and tend to not swap much (if at all) so we probably rarely hit\nthe case where dirty is missing or young is missing, but I think Shan has\na piece of SW that can reliably reproduce it using a shared writable\nmapping \u0026 fork or something like that.\n\nOn archs who use SW tracking of dirty \u0026 young, a page without dirty is\neffectively mapped read-only and a page without young unaccessible in the\nPTE.\n\nAdditionally, some architectures might lazily flush the TLB when relaxing\nwrite protection (by doing only a local flush), and expect a fault to\ninvalidate the stale entry if it\u0027s still present on another processor.\n\nThe futex code assumes that if the \"in_atomic()\" access -EFAULT\u0027s, it can\n\"fix it up\" by causing get_user_pages() which would then be equivalent to\ntaking the fault.\n\nHowever that isn\u0027t the case.  get_user_pages() will not call\nhandle_mm_fault() in the case where the PTE seems to have the right\npermissions, regardless of the dirty and young state.  It will eventually\nupdate those bits ...  in the struct page, but not in the PTE.\n\nAdditionally, it will not handle the lazy TLB flushing that can be\nrequired by some architectures in the fault case.\n\nBasically, gup is the wrong interface for the job.  The patch provides a\nmore appropriate one which boils down to just calling handle_mm_fault()\nsince what we are trying to do is simulate a real page fault.\n\nThe futex code currently attempts to write to user memory within a\npagefault disabled section, and if that fails, tries to fix it up using\nget_user_pages().\n\nThis doesn\u0027t work on archs where the dirty and young bits are maintained\nby software, since they will gate access permission in the TLB, and will\nnot be updated by gup().\n\nIn addition, there\u0027s an expectation on some archs that a spurious write\nfault triggers a local TLB flush, and that is missing from the picture as\nwell.\n\nI decided that adding those \"features\" to gup() would be too much for this\nalready too complex function, and instead added a new simpler\nfixup_user_fault() which is essentially a wrapper around handle_mm_fault()\nwhich the futex code can call.\n\n[akpm@linux-foundation.org: coding-style fixes]\n[akpm@linux-foundation.org: fix some nits Darren saw, fiddle comment layout]\nSigned-off-by: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nReported-by: Shan Hai \u003chaishan.bai@gmail.com\u003e\nTested-by: Shan Hai \u003chaishan.bai@gmail.com\u003e\nCc: David Laight \u003cDavid.Laight@ACULAB.COM\u003e\nAcked-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Darren Hart \u003cdarren.hart@intel.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1d65f86db14806cf7b1218c7b4ecb8b4db5af27d",
      "tree": "01a2c4e3feb48327220b1fd8d09cf805c20eee7f",
      "parents": [
        "d515afe88a32e567c550e3db914f3e378f86453a"
      ],
      "author": {
        "name": "KAMEZAWA Hiroyuki",
        "email": "kamezawa.hiroyu@jp.fujitsu.com",
        "time": "Mon Jul 25 17:12:27 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jul 25 20:57:10 2011 -0700"
      },
      "message": "mm: preallocate page before lock_page() at filemap COW\n\nCurrently we are keeping faulted page locked throughout whole __do_fault\ncall (except for page_mkwrite code path) after calling file system\u0027s fault\ncode.  If we do early COW, we allocate a new page which has to be charged\nfor a memcg (mem_cgroup_newpage_charge).\n\nThis function, however, might block for unbounded amount of time if memcg\noom killer is disabled or fork-bomb is running because the only way out of\nthe OOM situation is either an external event or OOM-situation fix.\n\nIn the end we are keeping the faulted page locked and blocking other\nprocesses from faulting it in which is not good at all because we are\nbasically punishing potentially an unrelated process for OOM condition in\na different group (I have seen stuck system because of ld-2.11.1.so being\nlocked).\n\nWe can do test easily.\n\n % cgcreate -g memory:A\n % cgset -r memory.limit_in_bytes\u003d64M A\n % cgset -r memory.memsw.limit_in_bytes\u003d64M A\n % cd kernel_dir; cgexec -g memory:A make -j\n\nThen, the whole system will live-locked until you kill \u0027make -j\u0027\nby hands (or push reboot...) This is because some important page in a\na shared library are locked.\n\nConsidering again, the new page is not necessary to be allocated\nwith lock_page() held. And usual page allocation may dive into\nlong memory reclaim loop with holding lock_page() and can cause\nvery long latency.\n\nThere are 3 ways.\n  1. do allocation/charge before lock_page()\n     Pros. - simple and can handle page allocation in the same manner.\n             This will reduce holding time of lock_page() in general.\n     Cons. - we do page allocation even if -\u003efault() returns error.\n\n  2. do charge after unlock_page(). Even if charge fails, it\u0027s just OOM.\n     Pros. - no impact to non-memcg path.\n     Cons. - implemenation requires special cares of LRU and we need to modify\n             page_add_new_anon_rmap()...\n\n  3. do unlock-\u003echarge-\u003elock again method.\n     Pros. - no impact to non-memcg path.\n     Cons. - This may kill LOCK_PAGE_RETRY optimization. We need to release\n             lock and get it again...\n\nThis patch moves \"charge\" and memory allocation for COW page\nbefore lock_page(). Then, we can avoid scanning LRU with holding\na lock on a page and latency under lock_page() will be reduced.\n\nThen, above livelock disappears.\n\n[akpm@linux-foundation.org: fix code layout]\nSigned-off-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReported-by: Lutz Vieweg \u003clvml@5t9.de\u003e\nOriginal-idea-by: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "6ac47520063b230641a64062b8a229201cd0a3a8",
      "tree": "e26a25226f980a50468f001bbd3243d74d0d9768",
      "parents": [
        "32f84528fbb5177275193a3311be8756f0cbd62c"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Mon Jul 25 17:12:16 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jul 25 20:57:09 2011 -0700"
      },
      "message": "mm/memory.c: remove ZAP_BLOCK_SIZE\n\nZAP_BLOCK_SIZE became unused in the preemptible-mmu_gather work (\"mm:\nRemove i_mmap_lock lockbreak\").  So zap it.\n\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0b43c3aab0137595335b08b340a3f3e5af9818a6",
      "tree": "dad2556800b89d42875470744a25533d1d983989",
      "parents": [
        "215ddd6664ced067afca7eebd2d1eb83f064ff5a"
      ],
      "author": {
        "name": "Shaohua Li",
        "email": "shaohua.li@intel.com",
        "time": "Fri Jul 08 15:39:41 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jul 08 21:14:43 2011 -0700"
      },
      "message": "mm: __tlb_remove_page() check the correct batch\n\n__tlb_remove_page() switches to a new batch page, but still checks space\nin the old batch.  This check always fails, and causes a forced tlb flush.\n\nSigned-off-by: Shaohua Li \u003cshaohua.li@intel.com\u003e\nAcked-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5b8ba10198a109f8a02380648c5d29000caa9c55",
      "tree": "1e4328d86395baa3d429c0d9911b7d7e1272629d",
      "parents": [
        "4d258b25d947521c8b913154db61ec55198243f8"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Mon Jun 27 16:18:01 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Jun 27 18:00:12 2011 -0700"
      },
      "message": "mm: move vmtruncate_range to truncate.c\n\nYou would expect to find vmtruncate_range() next to vmtruncate() in\nmm/truncate.c: move it there.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5f1a19070b16c20cdc71ed0e981bfa19f8f6a4ee",
      "tree": "f3eaeb7a040e2484d71485118d58e34eb0760bf3",
      "parents": [
        "4bbd61fb9726808e72ab2aa440401f6e5e1aa8f7"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "rostedt@goodmis.org",
        "time": "Wed Jun 15 15:08:23 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:04:00 2011 -0700"
      },
      "message": "mm: fix wrong kunmap_atomic() pointer\n\nRunning a ktest.pl test, I hit the following bug on x86_32:\n\n  ------------[ cut here ]------------\n  WARNING: at arch/x86/mm/highmem_32.c:81 __kunmap_atomic+0x64/0xc1()\n   Hardware name:\n  Modules linked in:\n  Pid: 93, comm: sh Not tainted 2.6.39-test+ #1\n  Call Trace:\n   [\u003cc04450da\u003e] warn_slowpath_common+0x7c/0x91\n   [\u003cc042f5df\u003e] ? __kunmap_atomic+0x64/0xc1\n   [\u003cc042f5df\u003e] ? __kunmap_atomic+0x64/0xc1^M\n   [\u003cc0445111\u003e] warn_slowpath_null+0x22/0x24\n   [\u003cc042f5df\u003e] __kunmap_atomic+0x64/0xc1\n   [\u003cc04d4a22\u003e] unmap_vmas+0x43a/0x4e0\n   [\u003cc04d9065\u003e] exit_mmap+0x91/0xd2\n   [\u003cc0443057\u003e] mmput+0x43/0xad\n   [\u003cc0448358\u003e] exit_mm+0x111/0x119\n   [\u003cc044855f\u003e] do_exit+0x1ff/0x5fa\n   [\u003cc0454ea2\u003e] ? set_current_blocked+0x3c/0x40\n   [\u003cc0454f24\u003e] ? sigprocmask+0x7e/0x8e\n   [\u003cc0448b55\u003e] do_group_exit+0x65/0x88\n   [\u003cc0448b90\u003e] sys_exit_group+0x18/0x1c\n   [\u003cc0c3915f\u003e] sysenter_do_call+0x12/0x38\n  ---[ end trace 8055f74ea3c0eb62 ]---\n\nRunning a ktest.pl git bisect, found the culprit: commit e303297e6c3a\n(\"mm: extended batches for generic mmu_gather\")\n\nBut although this was the commit triggering the bug, it was not the one\noriginally responsible for the bug.  That was commit d16dfc550f53 (\"mm:\nmmu_gather rework\").\n\nThe code in zap_pte_range() has something that looks like the following:\n\n\tpte \u003d  pte_offset_map_lock(mm, pmd, addr, \u0026ptl);\n\tdo {\n\t\t[...]\n\t} while (pte++, addr +\u003d PAGE_SIZE, addr !\u003d end);\n\tpte_unmap_unlock(pte - 1, ptl);\n\nThe pte starts off pointing at the first element in the page table\ndirectory that was returned by the pte_offset_map_lock().  When it\u0027s done\nwith the page, pte will be pointing to anything between the next entry and\nthe first entry of the next page inclusive.  By doing a pte - 1, this puts\nthe pte back onto the original page, which is all that pte_unmap_unlock()\nneeds.\n\nIn most archs (64 bit), this is not an issue as the pte is ignored in the\npte_unmap_unlock().  But on 32 bit archs, where things may be kmapped, it\nis essential that the pte passed to pte_unmap_unlock() resides on the same\npage that was given by pte_offest_map_lock().\n\nThe problem came in d16dfc55 (\"mm: mmu_gather rework\") where it introduced\na \"break;\" from the while loop.  This alone did not seem to easily trigger\nthe bug.  But the modifications made by e303297e6 caused that \"break;\" to\nbe hit on the first iteration, before the pte++.\n\nThe pte not being incremented will now cause pte_unmap_unlock(pte - 1) to\nbe pointing to the previous page.  This will cause the wrong page to be\nunmapped, and also trigger the warning above.\n\nThe simple solution is to just save the pointer given by\npte_offset_map_lock() and use it in the unlock.\n\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0164f69d0cf1a6abbc936851f5b72ece92187cda",
      "tree": "000bb234b98d76ce0b5195a3ee53a505aa0d3d86",
      "parents": [
        "f300ea499721ca208fc4714b9105bfd7e9f75be0"
      ],
      "author": {
        "name": "Randy Dunlap",
        "email": "randy.dunlap@oracle.com",
        "time": "Wed Jun 15 15:08:09 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Jun 15 20:03:59 2011 -0700"
      },
      "message": "mm/memory.c: fix kernel-doc notation\n\nFix new kernel-doc warnings in mm/memory.c:\n\n  Warning(mm/memory.c:1327): No description found for parameter \u0027tlb\u0027\n  Warning(mm/memory.c:1327): Excess function parameter \u0027tlbp\u0027 description in \u0027unmap_vmas\u0027\n\nSigned-off-by: Randy Dunlap \u003crandy.dunlap@oracle.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "456f998ec817ebfa254464be4f089542fa390645",
      "tree": "5976aa500638f0bbade1a672233cad71765b89b8",
      "parents": [
        "406eb0c9ba765eb066406fd5ce9d5e2b169a4d5a"
      ],
      "author": {
        "name": "Ying Han",
        "email": "yinghan@google.com",
        "time": "Thu May 26 16:25:38 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 26 17:12:36 2011 -0700"
      },
      "message": "memcg: add the pagefault count into memcg stats\n\nTwo new stats in per-memcg memory.stat which tracks the number of page\nfaults and number of major page faults.\n\n  \"pgfault\"\n  \"pgmajfault\"\n\nThey are different from \"pgpgin\"/\"pgpgout\" stat which count number of\npages charged/discharged to the cgroup and have no meaning of reading/\nwriting page to disk.\n\nIt is valuable to track the two stats for both measuring application\u0027s\nperformance as well as the efficiency of the kernel page reclaim path.\nCounting pagefaults per process is useful, but we also need the aggregated\nvalue since processes are monitored and controlled in cgroup basis in\nmemcg.\n\nFunctional test: check the total number of pgfault/pgmajfault of all\nmemcgs and compare with global vmstat value:\n\n  $ cat /proc/vmstat | grep fault\n  pgfault 1070751\n  pgmajfault 553\n\n  $ cat /dev/cgroup/memory.stat | grep fault\n  pgfault 1071138\n  pgmajfault 553\n  total_pgfault 1071142\n  total_pgmajfault 553\n\n  $ cat /dev/cgroup/A/memory.stat | grep fault\n  pgfault 199\n  pgmajfault 0\n  total_pgfault 199\n  total_pgmajfault 0\n\nPerformance test: run page fault test(pft) wit 16 thread on faulting in\n15G anon pages in 16G container.  There is no regression noticed on the\n\"flt/cpu/s\"\n\nSample output from pft:\n\n  TAG pft:anon-sys-default:\n    Gb  Thr CLine   User     System     Wall    flt/cpu/s fault/wsec\n    15   16   1     0.67s   233.41s    14.76s   16798.546 266356.260\n\n  +-------------------------------------------------------------------------+\n      N           Min           Max        Median           Avg        Stddev\n  x  10     16682.962     17344.027     16913.524     16928.812      166.5362\n  +  10     16695.568     16923.896     16820.604     16824.652     84.816568\n  No difference proven at 95.0% confidence\n\n[akpm@linux-foundation.org: fix build]\n[hughd@google.com: shmem fix]\nSigned-off-by: Ying Han \u003cyinghan@google.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nSigned-off-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": "ca16d140af91febe25daeb9e032bf8bd46b8c31f",
      "tree": "a093c3f244a1bdfc2a50e271a7e6df3324df0f05",
      "parents": [
        "4db70f73e56961b9bcdfd0c36c62847a18b7dbb5"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu May 26 19:16:19 2011 +0900"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu May 26 09:20:31 2011 -0700"
      },
      "message": "mm: don\u0027t access vm_flags as \u0027int\u0027\n\nThe type of vma-\u003evm_flags is \u0027unsigned long\u0027. Neither \u0027int\u0027 nor\n\u0027unsigned int\u0027. This patch fixes such misuse.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\n[ Changed to use a typedef - we\u0027ll extend it to cover more cases\n  later, since there has been discussion about making it a 64-bit\n  type..                      - Linus ]\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9547d01bfb9c351dc19067f8a4cea9d3955f4125",
      "tree": "3c32521dbbf380471e1eef3e11ae656b24164255",
      "parents": [
        "88c22088bf235f50b09a10bd9f022b0472bcb6b5"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Tue May 24 17:12:14 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:20 2011 -0700"
      },
      "message": "mm: uninline large generic tlb.h functions\n\nSome of these functions have grown beyond inline sanity, move them\nout-of-line.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nRequested-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nRequested-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": "3d48ae45e72390ddf8cc5256ac32ed6f7a19cbea",
      "tree": "1f46db3a8424090dd8e0b58991fa5acc1a73e680",
      "parents": [
        "97a894136f29802da19a15541de3c019e1ca147e"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Tue May 24 17:12:06 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:18 2011 -0700"
      },
      "message": "mm: Convert i_mmap_lock to a mutex\n\nStraightforward conversion of i_mmap_lock to a mutex.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: David Miller \u003cdavem@davemloft.net\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Russell King \u003crmk@arm.linux.org.uk\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nCc: Richard Weinberger \u003crichard@nod.at\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Namhyung Kim \u003cnamhyung@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": "97a894136f29802da19a15541de3c019e1ca147e",
      "tree": "1fd3f92ba92a37d5d8527a1f41458091d0a944dc",
      "parents": [
        "e4c70a6629f9c74c4b0de258a3951890e9047c82"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Tue May 24 17:12:04 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:17 2011 -0700"
      },
      "message": "mm: Remove i_mmap_lock lockbreak\n\nHugh says:\n \"The only significant loser, I think, would be page reclaim (when\n  concurrent with truncation): could spin for a long time waiting for\n  the i_mmap_mutex it expects would soon be dropped? \"\n\nCounter points:\n - cpu contention makes the spin stop (need_resched())\n - zap pages should be freeing pages at a higher rate than reclaim\n   ever can\n\nI think the simplification of the truncate code is definitely worth it.\n\nEffectively reverts: 2aa15890f3c (\"mm: prevent concurrent\nunmap_mapping_range() on the same inode\") and takes out the code that\ncaused its problem.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: David Miller \u003cdavem@davemloft.net\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Russell King \u003crmk@arm.linux.org.uk\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nCc: Richard Weinberger \u003crichard@nod.at\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Namhyung Kim \u003cnamhyung@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": "e303297e6c3a7b847c4731eb14006ca6b435ecca",
      "tree": "c2bbec8fb0cad1405f4a3ff908cd1d22abcd3e77",
      "parents": [
        "267239116987d64850ad2037d8e0f3071dc3b5ce"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Tue May 24 17:12:01 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:16 2011 -0700"
      },
      "message": "mm: extended batches for generic mmu_gather\n\nInstead of using a single batch (the small on-stack, or an allocated\npage), try and extend the batch every time it runs out and only flush once\neither the extend fails or we\u0027re done.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nRequested-by: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: David Miller \u003cdavem@davemloft.net\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Russell King \u003crmk@arm.linux.org.uk\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nCc: Richard Weinberger \u003crichard@nod.at\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Namhyung Kim \u003cnamhyung@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": "267239116987d64850ad2037d8e0f3071dc3b5ce",
      "tree": "142595897f7fc7bb673b791891dcc2fab31f6e91",
      "parents": [
        "1c395176962176660bb108f90e97e1686cfe0d85"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Tue May 24 17:12:00 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:16 2011 -0700"
      },
      "message": "mm, powerpc: move the RCU page-table freeing into generic code\n\nIn case other architectures require RCU freed page-tables to implement\ngup_fast() and software filled hashes and similar things, provide the\nmeans to do so by moving the logic into generic code.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nRequested-by: David Miller \u003cdavem@davemloft.net\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Russell King \u003crmk@arm.linux.org.uk\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nCc: Richard Weinberger \u003crichard@nod.at\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Namhyung Kim \u003cnamhyung@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": "d16dfc550f5326a4000f3322582a7c05dec91d7a",
      "tree": "8ee963542705cbf2187777f1d3f2b209cbda827a",
      "parents": [
        "d05f3169c0fbca16132ec7c2be71685c6de638b5"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "a.p.zijlstra@chello.nl",
        "time": "Tue May 24 17:11:45 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed May 25 08:39:12 2011 -0700"
      },
      "message": "mm: mmu_gather rework\n\nRework the existing mmu_gather infrastructure.\n\nThe direct purpose of these patches was to allow preemptible mmu_gather,\nbut even without that I think these patches provide an improvement to the\nstatus quo.\n\nThe first 9 patches rework the mmu_gather infrastructure.  For review\npurpose I\u0027ve split them into generic and per-arch patches with the last of\nthose a generic cleanup.\n\nThe next patch provides generic RCU page-table freeing, and the followup\nis a patch converting s390 to use this.  I\u0027ve also got 4 patches from\nDaveM lined up (not included in this series) that uses this to implement\ngup_fast() for sparc64.\n\nThen there is one patch that extends the generic mmu_gather batching.\n\nAfter that follow the mm preemptibility patches, these make part of the mm\na lot more preemptible.  It converts i_mmap_lock and anon_vma-\u003elock to\nmutexes which together with the mmu_gather rework makes mmu_gather\npreemptible as well.\n\nMaking i_mmap_lock a mutex also enables a clean-up of the truncate code.\n\nThis also allows for preemptible mmu_notifiers, something that XPMEM I\nthink wants.\n\nFurthermore, it removes the new and universially detested unmap_mutex.\n\nThis patch:\n\nRemove the first obstacle towards a fully preemptible mmu_gather.\n\nThe current scheme assumes mmu_gather is always done with preemption\ndisabled and uses per-cpu storage for the page batches.  Change this to\ntry and allocate a page for batching and in case of failure, use a small\non-stack array to make some progress.\n\nPreemptible mmu_gather is desired in general and usable once i_mmap_lock\nbecomes a mutex.  Doing it before the mutex conversion saves us from\nhaving to rework the code by moving the mmu_gather bits inside the\npte_lock.\n\nAlso avoid flushing the tlb batches from under the pte lock, this is\nuseful even without the i_mmap_lock conversion as it significantly reduces\npte lock hold times.\n\n[akpm@linux-foundation.org: fix comment tpyo]\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nCc: David Miller \u003cdavem@davemloft.net\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nCc: Russell King \u003crmk@arm.linux.org.uk\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nCc: Richard Weinberger \u003crichard@nod.at\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Namhyung Kim \u003cnamhyung@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ],
  "next": "d05f3169c0fbca16132ec7c2be71685c6de638b5"
}
