)]}'
{
  "log": [
    {
      "commit": "878aee7d6b5504e01b9caffce080e792b6b8d090",
      "tree": "c4a01a78885c25b6b3b1e0c74af7cb83c98a07c5",
      "parents": [
        "8ee53820edfd1f3b6554c593f337148dd3d7fc91"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:10 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: freeze khugepaged and ksmd\n\nIt\u0027s unclear why schedule friendly kernel threads can\u0027t be taken away by\nthe CPU through the scheduler itself.  It\u0027s safer to stop them as they can\ntrigger memory allocation, if kswapd also freezes itself to avoid\ngenerating I/O they have too.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8ee53820edfd1f3b6554c593f337148dd3d7fc91",
      "tree": "ca69957e928cd3efa1b47f92dcfb00591702684c",
      "parents": [
        "4b7167b9ff9b7f3f528cbc4c7d02ebd275b9b10c"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:10 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:46 2011 -0800"
      },
      "message": "thp: mmu_notifier_test_young\n\nFor GRU and EPT, we need gup-fast to set referenced bit too (this is why\nit\u0027s correct to return 0 when shadow_access_mask is zero, it requires\ngup-fast to set the referenced bit).  qemu-kvm access already sets the\nyoung bit in the pte if it isn\u0027t zero-copy, if it\u0027s zero copy or a shadow\npaging EPT minor fault we relay on gup-fast to signal the page is in\nuse...\n\nWe also need to check the young bits on the secondary pagetables for NPT\nand not nested shadow mmu as the data may never get accessed again by the\nprimary pte.\n\nWithout this closer accuracy, we\u0027d have to remove the heuristic that\navoids collapsing hugepages in hugepage virtual regions that have not even\na single subpage in use.\n\n-\u003etest_young is full backwards compatible with GRU and other usages that\ndon\u0027t have young bits in pagetables set by the hardware and that should\nnuke the secondary mmu mappings when -\u003eclear_flush_young runs just like\nEPT does.\n\nRemoving the heuristic that checks the young bit in\nkhugepaged/collapse_huge_page completely isn\u0027t so bad either probably but\nI thought it was worth it and this makes it reliable.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4b7167b9ff9b7f3f528cbc4c7d02ebd275b9b10c",
      "tree": "ad2c23c28b9dea009daf3719aefeb79103e2c152",
      "parents": [
        "94fcc585fb85ad7b059c70872489b50044d401f3"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:09 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: don\u0027t allow transparent hugepage support without PSE\n\nArchs implementing Transparent Hugepage Support must implement a function\ncalled has_transparent_hugepage to be sure the virtual or physical CPU\nsupports Transparent Hugepages.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "94fcc585fb85ad7b059c70872489b50044d401f3",
      "tree": "67efce3803149bec77df1f50a06f384deae02ba6",
      "parents": [
        "bc835011afbea3957217ee716093d791fb2fe44f"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:08 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: avoid breaking huge pmd invariants in case of vma_adjust failures\n\nAn huge pmd can only be mapped if the corresponding 2M virtual range is\nfully contained in the vma.  At times the VM calls split_vma twice, if the\nfirst split_vma succeeds and the second fail, the first split_vma remains\nin effect and it\u0027s not rolled back.  For split_vma or vma_adjust to fail\nan allocation failure is needed so it\u0027s a very unlikely event (the out of\nmemory killer would normally fire before any allocation failure is visible\nto kernel and userland and if an out of memory condition happens it\u0027s\nunlikely to happen exactly here).  Nevertheless it\u0027s safer to ensure that\nno huge pmd can be left around if the vma is adjusted in a way that can\u0027t\nfit hugepages anymore at the new vm_start/vm_end address.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bc835011afbea3957217ee716093d791fb2fe44f",
      "tree": "50d1f2ffb4c1ff8cef4c9fb7fb115faeed0d0339",
      "parents": [
        "5d6892407cab23d4bf2f6de065ca351a53849323"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:08 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: transhuge isolate_migratepages()\n\nIt\u0027s not worth migrating transparent hugepages during compaction.  Those\nhugepages don\u0027t create fragmentation.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5d6892407cab23d4bf2f6de065ca351a53849323",
      "tree": "fd1a32bd669b787ed1a651cc68c9f4def1fbd41e",
      "parents": [
        "13ece886d99cd668483113f7238e419d5331af26"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:07 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled\n\nWith transparent hugepage support we need compaction for the \"defrag\"\nsysfs controls to be effective.\n\nAt the moment THP hangs the system if COMPACTION isn\u0027t selected, as\nwithout COMPACTION lumpy reclaim wouldn\u0027t be entirely disabled.  So at the\nmoment it\u0027s not orthogonal.  When lumpy will be removed from the VM I can\nremove the select COMPACTION in theory, but then 99% of THP users would be\nstill doing a mistake in disabling compaction, even if the mistake won\u0027t\nreturn in fatal runtime but just slightly degraded performance.  So from a\ntheoretical standpoing forcing the below select is not needed (the\ndependency isn\u0027t strict nor at compile time nor at runtime) but from a\npractical standpoint it is safer.\n\nIf anybody really wants THP to run without compaction, it\u0027d be such a\nweird setup that editing the Kconfig file to allow it will be surely not a\nproblem.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "13ece886d99cd668483113f7238e419d5331af26",
      "tree": "44a1c65870ba4463316f943f52d898bb3763ab81",
      "parents": [
        "ce83d2174ea9c3d72d5821cf3ebc974e36391bf7"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:07 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: transparent hugepage config choice\n\nAllow to choose between the always|madvise default for page faults and\nkhugepaged at config time.  madvise guarantees zero risk of higher memory\nfootprint for applications (applications using madvise(MADV_HUGEPAGE)\nwon\u0027t risk to use any more memory by backing their virtual regions with\nhugepages).\n\nInitially set the default to N and don\u0027t depend on EMBEDDED.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ce83d2174ea9c3d72d5821cf3ebc974e36391bf7",
      "tree": "5e31167f84110551cf00ed3335b2cc3af317b33a",
      "parents": [
        "0bbbc0b33d141f78a0d9218a54a47f50621220d3"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:06 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: allocate memory in khugepaged outside of mmap_sem write mode\n\nThis tries to be more friendly to filesystem in userland, with userland\nbackends that allocate memory in the I/O paths and that could deadlock if\nkhugepaged holds the mmap_sem write mode of the userland backend while\nallocating memory.  Memory allocation may wait for writeback I/O\ncompletion from the daemon that may be blocked in the mmap_sem read mode\nif a page fault happens and the daemon wasn\u0027t using mlock for the memory\nrequired for the I/O submission and completion.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0bbbc0b33d141f78a0d9218a54a47f50621220d3",
      "tree": "3ef3363c189ac536926119731eb86dcf989f4adb",
      "parents": [
        "d39d33c332c611094f84cee39715866f4cbf79e2"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:05 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: add numa awareness to hugepage allocations\n\nIt\u0027s mostly a matter of replacing alloc_pages with alloc_pages_vma after\nintroducing alloc_pages_vma.  khugepaged needs special handling as the\nallocation has to happen inside collapse_huge_page where the vma is known\nand an error has to be returned to the outer loop to sleep\nalloc_sleep_millisecs in case of failure.  But it retains the more\nefficient logic of handling allocation failures in khugepaged in case of\nCONFIG_NUMA\u003dn.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d39d33c332c611094f84cee39715866f4cbf79e2",
      "tree": "d4b2a0d53867b9b679c098a08f831dca148acb19",
      "parents": [
        "f000565adb770b14cebbafde0a4f3e61a3342a63"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:05 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:45 2011 -0800"
      },
      "message": "thp: enable direct defrag\n\nWith memory compaction in, and lumpy-reclaim disabled, it seems safe\nenough to defrag memory during the (synchronous) transparent hugepage page\nfaults (TRANSPARENT_HUGEPAGE_DEFRAG_FLAG) and not only during khugepaged\n(async) hugepage allocations that was already enabled even before memory\ncompaction was in (TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f000565adb770b14cebbafde0a4f3e61a3342a63",
      "tree": "ff2884da257e1df1b8cb4817d09c892d4f84727c",
      "parents": [
        "cd7548ab360c462118568eebb8c6da3bc303b02e"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:04 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: set recommended min free kbytes\n\nIf transparent hugepage is enabled initialize min_free_kbytes to an\noptimal value by default.  This moves the hugeadm algorithm in kernel.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cd7548ab360c462118568eebb8c6da3bc303b02e",
      "tree": "44d145e6139c8753659ee773ae35810dc3d92d0b",
      "parents": [
        "b36f5b0710e9e3b92484de32920fddcb17278664"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:04 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: mprotect: transparent huge page support\n\nNatively handle huge pmds when changing page tables on behalf of\nmprotect().\n\nI left out update_mmu_cache() because we do not need it on x86 anyway but\nmore importantly the interface works on ptes, not pmds.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b36f5b0710e9e3b92484de32920fddcb17278664",
      "tree": "823f5ee3ff0e18c67489bd8e525d83f3f7cf1b1a",
      "parents": [
        "c489f1257b8cacd4881a18da1e93659f934a8e98"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:03 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: mprotect: pass vma down to page table walkers\n\nFlushing the tlb for huge pmds requires the vma\u0027s anon_vma, so pass along\nthe vma instead of the mm, we can always get the latter when we need it.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c489f1257b8cacd4881a18da1e93659f934a8e98",
      "tree": "c06e1611a9af8726999d3d95599934910237735b",
      "parents": [
        "0ca1634d4143c3579273ca53b993df19f5c98e92"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:02 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: add pmd_modify\n\nAdd pmd_modify() for use with mprotect() on huge pmds.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0ca1634d4143c3579273ca53b993df19f5c98e92",
      "tree": "d566a582357a9e1528d1783566bfda4375c7e566",
      "parents": [
        "f2d6bfe9ff0acec30b713614260e78b03d20e909"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:02 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: mincore transparent hugepage support\n\nHandle transparent huge page pmd entries natively instead of splitting\nthem into subpages.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f2d6bfe9ff0acec30b713614260e78b03d20e909",
      "tree": "835dd9f4167513d94ae542cf92347ea98bff5ddc",
      "parents": [
        "5f24ce5fd34c3ca1b3d10d30da754732da64d5c0"
      ],
      "author": {
        "name": "Johannes Weiner",
        "email": "hannes@cmpxchg.org",
        "time": "Thu Jan 13 15:47:01 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:44 2011 -0800"
      },
      "message": "thp: add x86 32bit support\n\nAdd support for transparent hugepages to x86 32bit.\n\nShare the same VM_ bitflag for VM_MAPPED_COPY.  mm/nommu.c will never\nsupport transparent hugepages.\n\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5f24ce5fd34c3ca1b3d10d30da754732da64d5c0",
      "tree": "c82d27461f2adda210e77808b7dd04eaec017f2f",
      "parents": [
        "21ae5b01750f14140809508a478a4413792e0261"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:00 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: remove PG_buddy\n\nPG_buddy can be converted to _mapcount \u003d\u003d -2.  So the PG_compound_lock can\nbe added to page-\u003eflags without overflowing (because of the sparse section\nbits increasing) with CONFIG_X86_PAE\u003dy and CONFIG_X86_PAT\u003dy.  This also\nhas to move the memory hotplug code from _mapcount to lru.next to avoid\nany risk of clashes.  We can\u0027t use lru.next for PG_buddy removal, but\nmemory hotplug can use lru.next even more easily than the mapcount\ninstead.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "21ae5b01750f14140809508a478a4413792e0261",
      "tree": "49fff503cf2e17e0f8e583e83e43b337f9728c23",
      "parents": [
        "b15d00b6af617251cc70a908df983e9aff57e169"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:47:00 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: skip transhuge pages in ksm for now\n\nSkip transhuge pages in ksm for now.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b15d00b6af617251cc70a908df983e9aff57e169",
      "tree": "0fd28ef8d3705505d5b84d495875e3837698b540",
      "parents": [
        "ba76149f47d8c939efa0acc07a191237af900471"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:59 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: khugepaged vma merge\n\nregister in khugepaged if the vma grows.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ba76149f47d8c939efa0acc07a191237af900471",
      "tree": "162990f51dd24984f114cba14fc7169a3b54f0f1",
      "parents": [
        "79134171df238171daa4c024a42b77b401ccb00b"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:58 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: khugepaged\n\nAdd khugepaged to relocate fragmented pages into hugepages if new\nhugepages become available.  (this is indipendent of the defrag logic that\nwill have to make new hugepages available)\n\nThe fundamental reason why khugepaged is unavoidable, is that some memory\ncan be fragmented and not everything can be relocated.  So when a virtual\nmachine quits and releases gigabytes of hugepages, we want to use those\nfreely available hugepages to create huge-pmd in the other virtual\nmachines that may be running on fragmented memory, to maximize the CPU\nefficiency at all times.  The scan is slow, it takes nearly zero cpu time,\nexcept when it copies data (in which case it means we definitely want to\npay for that cpu time) so it seems a good tradeoff.\n\nIn addition to the hugepages being released by other process releasing\nmemory, we have the strong suspicion that the performance impact of\npotentially defragmenting hugepages during or before each page fault could\nlead to more performance inconsistency than allocating small pages at\nfirst and having them collapsed into large pages later...  if they prove\nthemselfs to be long lived mappings (khugepaged scan is slow so short\nlived mappings have low probability to run into khugepaged if compared to\nlong lived mappings).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "79134171df238171daa4c024a42b77b401ccb00b",
      "tree": "af7872d5851e371d09b9fe7eb80f4809713c79fb",
      "parents": [
        "b9bbfbe30ae088cc88a4b2ba7732baeebd1a0162"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:58 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: transparent hugepage vmstat\n\nAdd hugepage stat information to /proc/vmstat and /proc/meminfo.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b9bbfbe30ae088cc88a4b2ba7732baeebd1a0162",
      "tree": "5f3d69ad2de2bdb8782180c7ce33bf1b9b190774",
      "parents": [
        "152c9ccb75548c027fa3103efa4fa4e19a345449"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:57 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: memcg huge memory\n\nAdd memcg charge/uncharge to hugepage faults in huge_memory.c.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "152c9ccb75548c027fa3103efa4fa4e19a345449",
      "tree": "d22e8f71b3e0689fc0e3ae21609ae1abe5bc4d2f",
      "parents": [
        "ec1685109f1314a30919489ef2800ed626a38c1e"
      ],
      "author": {
        "name": "Daisuke Nishimura",
        "email": "nishimura@mxp.nes.nec.co.jp",
        "time": "Thu Jan 13 15:46:56 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: transhuge-memcg: commit tail pages at charge\n\nBy this patch, when a transparent hugepage is charged, not only the head\npage but also all the tail pages are committed, IOW pc-\u003emem_cgroup and\npc-\u003eflags of tail pages are set.\n\nWithout this patch:\n\n- Tail pages are not linked to any memcg\u0027s LRU at splitting. This causes many\n  problems, for example, the charged memcg\u0027s directory can never be rmdir\u0027ed\n  because it doesn\u0027t have enough pages to scan to make the usage decrease to 0.\n- \"rss\" field in memory.stat would be incorrect. Moreover, usage_in_bytes in\n  root cgroup is calculated by the stat not by res_counter(since 2.6.32),\n  it would be incorrect too.\n\nSigned-off-by: Daisuke Nishimura \u003cnishimura@mxp.nes.nec.co.jp\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ec1685109f1314a30919489ef2800ed626a38c1e",
      "tree": "48ac32238182623af24b6c25be456c0ca432047b",
      "parents": [
        "500d65d471018d9a13b0d51b7e141ed2a3555c1d"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:56 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:43 2011 -0800"
      },
      "message": "thp: memcg compound\n\nTeach memcg to charge/uncharge compound pages.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "500d65d471018d9a13b0d51b7e141ed2a3555c1d",
      "tree": "046dc2337f87a1a365fde126fab7f4ac9ae82793",
      "parents": [
        "0af4e98b6b095c74588af04872f83d333c958c32"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:55 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: pmd_trans_huge migrate bugcheck\n\nNo pmd_trans_huge should ever materialize in migration ptes areas, because\nwe split the hugepage before migration ptes are instantiated.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0af4e98b6b095c74588af04872f83d333c958c32",
      "tree": "56b1965482470219a8cf11b7e7c875ae91bff46e",
      "parents": [
        "f66055ab6fb9731dbfce320c5202ef4441b5d77f"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:55 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: madvise(MADV_HUGEPAGE)\n\nAdd madvise MADV_HUGEPAGE to mark regions that are important to be\nhugepage backed.  Return -EINVAL if the vma is not of an anonymous type,\nor the feature isn\u0027t built into the kernel.  Never silently return\nsuccess.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f66055ab6fb9731dbfce320c5202ef4441b5d77f",
      "tree": "de347e42d1e5cf481344a153d272e86a95b774f4",
      "parents": [
        "05759d380a9d7f131a475186c07fce58ceaa8902"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:54 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: verify pmd_trans_huge isn\u0027t leaking\n\npte_trans_huge must not leak in certain vmas like the mmio special pfn or\nfilebacked mappings.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "05759d380a9d7f131a475186c07fce58ceaa8902",
      "tree": "6c253f15176c89f6f8dfd80b1471bcf3e0a3e44e",
      "parents": [
        "8a07651ee8cdaa9e27cb4ae372aed347533770f5"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:53 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: split_huge_page anon_vma ordering dependency\n\nThis documents how split_huge_page is safe vs new vma inserctions into the\nanon_vma that may have already released the anon_vma-\u003elock but not\nestablished pmds yet when split_huge_page starts.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8a07651ee8cdaa9e27cb4ae372aed347533770f5",
      "tree": "07a442e66c3f608e174edd3b8a2fd154f4219380",
      "parents": [
        "71e3aac0724ffe8918992d76acfe3aad7d8724a5"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:46:52 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: transparent hugepage core fixlet\n\nIf you configure THP in addition to HUGETLB_PAGE on x86_32 without PAE,\nthe p?d-folding works out that munlock_vma_pages_range() can crash to\nfollow_page()\u0027s pud_huge() BUG_ON(flags \u0026 FOLL_GET): it needs the same\nVM_HUGETLB check already there on the pmd_huge() line.  Conveniently,\nopenSUSE provides a \"blogd\" which tests this out at startup!\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "71e3aac0724ffe8918992d76acfe3aad7d8724a5",
      "tree": "4ff96e1fc3e53bc9d25b859bf7e5bdbab8f1b25a",
      "parents": [
        "5c3240d92e29ae7bfb9cb58a9b37e80ab40894ff"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:52 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: transparent hugepage core\n\nLately I\u0027ve been working to make KVM use hugepages transparently without\nthe usual restrictions of hugetlbfs.  Some of the restrictions I\u0027d like to\nsee removed:\n\n1) hugepages have to be swappable or the guest physical memory remains\n   locked in RAM and can\u0027t be paged out to swap\n\n2) if a hugepage allocation fails, regular pages should be allocated\n   instead and mixed in the same vma without any failure and without\n   userland noticing\n\n3) if some task quits and more hugepages become available in the\n   buddy, guest physical memory backed by regular pages should be\n   relocated on hugepages automatically in regions under\n   madvise(MADV_HUGEPAGE) (ideally event driven by waking up the\n   kernel deamon if the order\u003dHPAGE_PMD_SHIFT-PAGE_SHIFT list becomes\n   not null)\n\n4) avoidance of reservation and maximization of use of hugepages whenever\n   possible. Reservation (needed to avoid runtime fatal faliures) may be ok for\n   1 machine with 1 database with 1 database cache with 1 database cache size\n   known at boot time. It\u0027s definitely not feasible with a virtualization\n   hypervisor usage like RHEV-H that runs an unknown number of virtual machines\n   with an unknown size of each virtual machine with an unknown amount of\n   pagecache that could be potentially useful in the host for guest not using\n   O_DIRECT (aka cache\u003doff).\n\nhugepages in the virtualization hypervisor (and also in the guest!) are\nmuch more important than in a regular host not using virtualization,\nbecasue with NPT/EPT they decrease the tlb-miss cacheline accesses from 24\nto 19 in case only the hypervisor uses transparent hugepages, and they\ndecrease the tlb-miss cacheline accesses from 19 to 15 in case both the\nlinux hypervisor and the linux guest both uses this patch (though the\nguest will limit the addition speedup to anonymous regions only for\nnow...).  Even more important is that the tlb miss handler is much slower\non a NPT/EPT guest than for a regular shadow paging or no-virtualization\nscenario.  So maximizing the amount of virtual memory cached by the TLB\npays off significantly more with NPT/EPT than without (even if there would\nbe no significant speedup in the tlb-miss runtime).\n\nThe first (and more tedious) part of this work requires allowing the VM to\nhandle anonymous hugepages mixed with regular pages transparently on\nregular anonymous vmas.  This is what this patch tries to achieve in the\nleast intrusive possible way.  We want hugepages and hugetlb to be used in\na way so that all applications can benefit without changes (as usual we\nleverage the KVM virtualization design: by improving the Linux VM at\nlarge, KVM gets the performance boost too).\n\nThe most important design choice is: always fallback to 4k allocation if\nthe hugepage allocation fails!  This is the _very_ opposite of some large\npagecache patches that failed with -EIO back then if a 64k (or similar)\nallocation failed...\n\nSecond important decision (to reduce the impact of the feature on the\nexisting pagetable handling code) is that at any time we can split an\nhugepage into 512 regular pages and it has to be done with an operation\nthat can\u0027t fail.  This way the reliability of the swapping isn\u0027t decreased\n(no need to allocate memory when we are short on memory to swap) and it\u0027s\ntrivial to plug a split_huge_page* one-liner where needed without\npolluting the VM.  Over time we can teach mprotect, mremap and friends to\nhandle pmd_trans_huge natively without calling split_huge_page*.  The fact\nit can\u0027t fail isn\u0027t just for swap: if split_huge_page would return -ENOMEM\n(instead of the current void) we\u0027d need to rollback the mprotect from the\nmiddle of it (ideally including undoing the split_vma) which would be a\nbig change and in the very wrong direction (it\u0027d likely be simpler not to\ncall split_huge_page at all and to teach mprotect and friends to handle\nhugepages instead of rolling them back from the middle).  In short the\nvery value of split_huge_page is that it can\u0027t fail.\n\nThe collapsing and madvise(MADV_HUGEPAGE) part will remain separated and\nincremental and it\u0027ll just be an \"harmless\" addition later if this initial\npart is agreed upon.  It also should be noted that locking-wise replacing\nregular pages with hugepages is going to be very easy if compared to what\nI\u0027m doing below in split_huge_page, as it will only happen when\npage_count(page) matches page_mapcount(page) if we can take the PG_lock\nand mmap_sem in write mode.  collapse_huge_page will be a \"best effort\"\nthat (unlike split_huge_page) can fail at the minimal sign of trouble and\nwe can try again later.  collapse_huge_page will be similar to how KSM\nworks and the madvise(MADV_HUGEPAGE) will work similar to\nmadvise(MADV_MERGEABLE).\n\nThe default I like is that transparent hugepages are used at page fault\ntime.  This can be changed with\n/sys/kernel/mm/transparent_hugepage/enabled.  The control knob can be set\nto three values \"always\", \"madvise\", \"never\" which mean respectively that\nhugepages are always used, or only inside madvise(MADV_HUGEPAGE) regions,\nor never used.  /sys/kernel/mm/transparent_hugepage/defrag instead\ncontrols if the hugepage allocation should defrag memory aggressively\n\"always\", only inside \"madvise\" regions, or \"never\".\n\nThe pmd_trans_splitting/pmd_trans_huge locking is very solid.  The\nput_page (from get_user_page users that can\u0027t use mmu notifier like\nO_DIRECT) that runs against a __split_huge_page_refcount instead was a\npain to serialize in a way that would result always in a coherent page\ncount for both tail and head.  I think my locking solution with a\ncompound_lock taken only after the page_first is valid and is still a\nPageHead should be safe but it surely needs review from SMP race point of\nview.  In short there is no current existing way to serialize the O_DIRECT\nfinal put_page against split_huge_page_refcount so I had to invent a new\none (O_DIRECT loses knowledge on the mapping status by the time gup_fast\nreturns so...).  And I didn\u0027t want to impact all gup/gup_fast users for\nnow, maybe if we change the gup interface substantially we can avoid this\nlocking, I admit I didn\u0027t think too much about it because changing the gup\nunpinning interface would be invasive.\n\nIf we ignored O_DIRECT we could stick to the existing compound refcounting\ncode, by simply adding a get_user_pages_fast_flags(foll_flags) where KVM\n(and any other mmu notifier user) would call it without FOLL_GET (and if\nFOLL_GET isn\u0027t set we\u0027d just BUG_ON if nobody registered itself in the\ncurrent task mmu notifier list yet).  But O_DIRECT is fundamental for\ndecent performance of virtualized I/O on fast storage so we can\u0027t avoid it\nto solve the race of put_page against split_huge_page_refcount to achieve\na complete hugepage feature for KVM.\n\nSwap and oom works fine (well just like with regular pages ;).  MMU\nnotifier is handled transparently too, with the exception of the young bit\non the pmd, that didn\u0027t have a range check but I think KVM will be fine\nbecause the whole point of hugepages is that EPT/NPT will also use a huge\npmd when they notice gup returns pages with PageCompound set, so they\nwon\u0027t care of a range and there\u0027s just the pmd young bit to check in that\ncase.\n\nNOTE: in some cases if the L2 cache is small, this may slowdown and waste\nmemory during COWs because 4M of memory are accessed in a single fault\ninstead of 8k (the payoff is that after COW the program can run faster).\nSo we might want to switch the copy_huge_page (and clear_huge_page too) to\nnot temporal stores.  I also extensively researched ways to avoid this\ncache trashing with a full prefault logic that would cow in 8k/16k/32k/64k\nup to 1M (I can send those patches that fully implemented prefault) but I\nconcluded they\u0027re not worth it and they add an huge additional complexity\nand they remove all tlb benefits until the full hugepage has been faulted\nin, to save a little bit of memory and some cache during app startup, but\nthey still don\u0027t improve substantially the cache-trashing during startup\nif the prefault happens in \u003e4k chunks.  One reason is that those 4k pte\nentries copied are still mapped on a perfectly cache-colored hugepage, so\nthe trashing is the worst one can generate in those copies (cow of 4k page\ncopies aren\u0027t so well colored so they trashes less, but again this results\nin software running faster after the page fault).  Those prefault patches\nallowed things like a pte where post-cow pages were local 4k regular anon\npages and the not-yet-cowed pte entries were pointing in the middle of\nsome hugepage mapped read-only.  If it doesn\u0027t payoff substantially with\ntodays hardware it will payoff even less in the future with larger l2\ncaches, and the prefault logic would blot the VM a lot.  If one is\nemebdded transparent_hugepage can be disabled during boot with sysfs or\nwith the boot commandline parameter transparent_hugepage\u003d0 (or\ntransparent_hugepage\u003d2 to restrict hugepages inside madvise regions) that\nwill ensure not a single hugepage is allocated at boot time.  It is simple\nenough to just disable transparent hugepage globally and let transparent\nhugepages be allocated selectively by applications in the MADV_HUGEPAGE\nregion (both at page fault time, and if enabled with the\ncollapse_huge_page too through the kernel daemon).\n\nThis patch supports only hugepages mapped in the pmd, archs that have\nsmaller hugepages will not fit in this patch alone.  Also some archs like\npower have certain tlb limits that prevents mixing different page size in\nthe same regions so they will not fit in this framework that requires\n\"graceful fallback\" to basic PAGE_SIZE in case of physical memory\nfragmentation.  hugetlbfs remains a perfect fit for those because its\nsoftware limits happen to match the hardware limits.  hugetlbfs also\nremains a perfect fit for hugepage sizes like 1GByte that cannot be hoped\nto be found not fragmented after a certain system uptime and that would be\nvery expensive to defragment with relocation, so requiring reservation.\nhugetlbfs is the \"reservation way\", the point of transparent hugepages is\nnot to have any reservation at all and maximizing the use of cache and\nhugepages at all times automatically.\n\nSome performance result:\n\nvmx andrea # LD_PRELOAD\u003d/usr/lib64/libhugetlbfs.so HUGETLB_MORECORE\u003dyes HUGETLB_PATH\u003d/mnt/huge/ ./largep\nages3\nmemset page fault 1566023\nmemset tlb miss 453854\nmemset second tlb miss 453321\nrandom access tlb miss 41635\nrandom access second tlb miss 41658\nvmx andrea # LD_PRELOAD\u003d/usr/lib64/libhugetlbfs.so HUGETLB_MORECORE\u003dyes HUGETLB_PATH\u003d/mnt/huge/ ./largepages3\nmemset page fault 1566471\nmemset tlb miss 453375\nmemset second tlb miss 453320\nrandom access tlb miss 41636\nrandom access second tlb miss 41637\nvmx andrea # ./largepages3\nmemset page fault 1566642\nmemset tlb miss 453417\nmemset second tlb miss 453313\nrandom access tlb miss 41630\nrandom access second tlb miss 41647\nvmx andrea # ./largepages3\nmemset page fault 1566872\nmemset tlb miss 453418\nmemset second tlb miss 453315\nrandom access tlb miss 41618\nrandom access second tlb miss 41659\nvmx andrea # echo 0 \u003e /proc/sys/vm/transparent_hugepage\nvmx andrea # ./largepages3\nmemset page fault 2182476\nmemset tlb miss 460305\nmemset second tlb miss 460179\nrandom access tlb miss 44483\nrandom access second tlb miss 44186\nvmx andrea # ./largepages3\nmemset page fault 2182791\nmemset tlb miss 460742\nmemset second tlb miss 459962\nrandom access tlb miss 43981\nrandom access second tlb miss 43988\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cstring.h\u003e\n#include \u003csys/time.h\u003e\n\n#define SIZE (3UL*1024*1024*1024)\n\nint main()\n{\n\tchar *p \u003d malloc(SIZE), *p2;\n\tstruct timeval before, after;\n\n\tgettimeofday(\u0026before, NULL);\n\tmemset(p, 0, SIZE);\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"memset page fault %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tmemset(p, 0, SIZE);\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"memset tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tmemset(p, 0, SIZE);\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"memset second tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tfor (p2 \u003d p; p2 \u003c p+SIZE; p2 +\u003d 4096)\n\t\t*p2 \u003d 0;\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"random access tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\tgettimeofday(\u0026before, NULL);\n\tfor (p2 \u003d p; p2 \u003c p+SIZE; p2 +\u003d 4096)\n\t\t*p2 \u003d 0;\n\tgettimeofday(\u0026after, NULL);\n\tprintf(\"random access second tlb miss %Lu\\n\",\n\t       (after.tv_sec-before.tv_sec)*1000000UL +\n\t       after.tv_usec-before.tv_usec);\n\n\treturn 0;\n}\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5c3240d92e29ae7bfb9cb58a9b37e80ab40894ff",
      "tree": "fffa9f90492b61ef1578e1c41118024c81d77863",
      "parents": [
        "32dba98e085f8b2b4345887df9abf5e0e93bfc12"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:49 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:42 2011 -0800"
      },
      "message": "thp: don\u0027t alloc harder for gfp nomemalloc even if nowait\n\nNot worth throwing away the precious reserved free memory pool for\nallocations that can fail gracefully (either through mempool or because\nthey\u0027re transhuge allocations later falling back to 4k allocations).\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "32dba98e085f8b2b4345887df9abf5e0e93bfc12",
      "tree": "6789196797350911a1c370ce909bfde2556ccfc4",
      "parents": [
        "936a5fe6e6148c0b3ea0d792b903847d9b9931a1"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:49 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: _GFP_NO_KSWAPD\n\nTransparent hugepage allocations must be allowed not to invoke kswapd or\nany other kind of indirect reclaim (especially when the defrag sysfs is\ncontrol disabled).  It\u0027s unacceptable to swap out anonymous pages\n(potentially anonymous transparent hugepages) in order to create new\ntransparent hugepages.  This is true for the MADV_HUGEPAGE areas too\n(swapping out a kvm virtual machine and so having it suffer an unbearable\nslowdown, so another one with guest physical memory marked MADV_HUGEPAGE\ncan run 30% faster if it is running memory intensive workloads, makes no\nsense).  If a transparent hugepage allocation fails the slowdown is minor\nand there is total fallback, so kswapd should never be asked to swapout\nmemory to allow the high order allocation to succeed.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "936a5fe6e6148c0b3ea0d792b903847d9b9931a1",
      "tree": "f0326a5877a89251ff2cb727d5e832e911ed1d18",
      "parents": [
        "47ad8475c000141eacb3ecda5e5ce4b43a9cd04d"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:48 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: kvm mmu transparent hugepage support\n\nThis should work for both hugetlbfs and transparent hugepages.\n\n[akpm@linux-foundation.org: bring forward PageTransCompound() addition for bisectability]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nCc: Marcelo Tosatti \u003cmtosatti@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": "47ad8475c000141eacb3ecda5e5ce4b43a9cd04d",
      "tree": "78c29aaf2ae9340e314a25ea08e9724471cf4414",
      "parents": [
        "3f04f62f90d46a82dd73027c5fd7a15daed5c33d"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: clear_copy_huge_page\n\nMove the copy/clear_huge_page functions to common code to share between\nhugetlb.c and huge_memory.c.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3f04f62f90d46a82dd73027c5fd7a15daed5c33d",
      "tree": "c267f1bdde3f3a7b2a8b52347fa5ad6053cff435",
      "parents": [
        "bae9c19bf12bb2a914a8e530270f41d36cc87c63"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: split_huge_page paging\n\nPaging logic that splits the page before it is unmapped and added to swap\nto ensure backwards compatibility with the legacy swap code.  Eventually\nswap should natively pageout the hugepages to increase performance and\ndecrease seeking and fragmentation of swap space.  swapoff can just skip\nover huge pmd as they cannot be part of swap yet.  In add_to_swap be\ncareful to split the page only if we got a valid swap entry so we don\u0027t\nsplit hugepages with a full swap.\n\nIn theory we could split pages before isolating them during the lru scan,\nbut for khugepaged to be safe, I\u0027m relying on either mmap_sem write mode,\nor PG_lock taken, so split_huge_page has to run either with mmap_sem\nread/write mode or PG_lock taken.  Calling it from isolate_lru_page would\nmake locking more complicated, in addition to that split_huge_page would\ndeadlock if called by __isolate_lru_page because it has to take the lru\nlock to add the tail pages.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bae9c19bf12bb2a914a8e530270f41d36cc87c63",
      "tree": "19807de9c2cb9b47fa842a549bd8c2c21579e323",
      "parents": [
        "e7a00c45f29c0155007aa150bf231a70fa470365"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:46 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: split_huge_page_mm/vma\n\nsplit_huge_page_pmd compat code.  Each one of those would need to be\nexpanded to hundred of lines of complex code without a fully reliable\nsplit_huge_page_pmd design.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e7a00c45f29c0155007aa150bf231a70fa470365",
      "tree": "3225a79905dede614ed44e98776cdc6285bbd28a",
      "parents": [
        "4e6af67e970a2ac287739a4c526c857b5bda27ec"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:45 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: add pmd_huge_pte to mm_struct\n\nThis increase the size of the mm struct a bit but it is needed to\npreallocate one pte for each hugepage so that split_huge_page will not\nrequire a fail path.  Guarantee of success is a fundamental property of\nsplit_huge_page to avoid decrasing swapping reliability and to avoid\nadding -ENOMEM fail paths that would otherwise force the hugepage-unaware\nVM code to learn rolling back in the middle of its pte mangling operations\n(if something we need it to learn handling pmd_trans_huge natively rather\nbeing capable of rollback).  When split_huge_page runs a pte is needed to\nsucceed the split, to map the newly splitted regular pages with a regular\npte.  This way all existing VM code remains backwards compatible by just\nadding a split_huge_page* one liner.  The memory waste of those\npreallocated ptes is negligible and so it is worth it.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4e6af67e970a2ac287739a4c526c857b5bda27ec",
      "tree": "2de1bcb20fb3ff136d6b65a651d06a572bfd677d",
      "parents": [
        "91a4ee2670e0ee2b0630a0eb24fb9a87ea3acd0a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:44 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: clear page compound\n\nsplit_huge_page must transform a compound page to a regular page and needs\nClearPageCompound.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "91a4ee2670e0ee2b0630a0eb24fb9a87ea3acd0a",
      "tree": "28b3fa3535295544928329290c365eecc5a770d2",
      "parents": [
        "8ac1f8320a0073f28cf9e0491af4cd98f504f92a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:44 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:41 2011 -0800"
      },
      "message": "thp: add pmd mmu_notifier helpers\n\nAdd mmu notifier helpers to handle pmd huge operations.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8ac1f8320a0073f28cf9e0491af4cd98f504f92a",
      "tree": "4dad891c302587fdc7b099b18e05d7dbc5526c64",
      "parents": [
        "64cc6ae001d70bc59e5f854e6b5678f59110df16"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:43 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: pte alloc trans splitting\n\npte alloc routines must wait for split_huge_page if the pmd is not present\nand not null (i.e.  pmd_trans_splitting).  The additional branches are\noptimized away at compile time by pmd_trans_splitting if the config option\nis off.  However we must pass the vma down in order to know the anon_vma\nlock to wait for.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "64cc6ae001d70bc59e5f854e6b5678f59110df16",
      "tree": "929358dabd522330ea145755ab0d0d7d27ac85b3",
      "parents": [
        "db3eb96f4e6281b84dd33c8980dacc27f2efe177"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:42 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: bail out gup_fast on splitting pmd\n\nForce gup_fast to take the slow path and block if the pmd is splitting,\nnot only if it\u0027s none.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "db3eb96f4e6281b84dd33c8980dacc27f2efe177",
      "tree": "0746ed213778d8cb9ec18c1c7c16490c233d178b",
      "parents": [
        "e2cda322648122dc400c85ada80eaddbc612ef6a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:41 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: add pmd mangling functions to x86\n\nAdd needed pmd mangling functions with symmetry with their pte\ncounterparts.  pmdp_splitting_flush() is the only new addition on the pmd_\nmethods and it\u0027s needed to serialize the VM against split_huge_page.  It\nsimply atomically sets the splitting bit in a similar way\npmdp_clear_flush_young atomically clears the accessed bit.\npmdp_splitting_flush() also has to flush the tlb to make it effective\nagainst gup_fast, but it wouldn\u0027t really require to flush the tlb too.\nJust the tlb flush is the simplest operation we can invoke to serialize\npmdp_splitting_flush() against gup_fast.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e2cda322648122dc400c85ada80eaddbc612ef6a",
      "tree": "016981ea6d9d3f7448bd9e04720184b14a79302c",
      "parents": [
        "5f6e8da70a289d403975907371ce5738c726ad3f"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:40 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: add pmd mangling generic functions\n\nSome are needed to build but not actually used on archs not supporting\ntransparent hugepages.  Others like pmdp_clear_flush are used by x86 too.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5f6e8da70a289d403975907371ce5738c726ad3f",
      "tree": "c44705a17d4133a8d4a8d02dae9bb5487c3bc2a6",
      "parents": [
        "4c76d9d1fb9b21fa10c9e4c1fab2875018a88aa1"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:40 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: special pmd_trans_* functions\n\nThese returns 0 at compile time when the config option is disabled, to\nallow gcc to eliminate the transparent hugepage function calls at compile\ntime without additional #ifdefs (only the export of those functions have\nto be visible to gcc but they won\u0027t be required at link time and\nhuge_memory.o can be not built at all).\n\n_PAGE_BIT_UNUSED1 is never used for pmd, only on pte.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4c76d9d1fb9b21fa10c9e4c1fab2875018a88aa1",
      "tree": "a7186c416e3fc0451702b42051e4b91dc3893f3f",
      "parents": [
        "59ff421631295cd54dbf75dcc53d27e84af6d9c0"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:39 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:40 2011 -0800"
      },
      "message": "thp: CONFIG_TRANSPARENT_HUGEPAGE\n\nAdd config option.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "59ff421631295cd54dbf75dcc53d27e84af6d9c0",
      "tree": "2570c413cd0e5938ed5e9c09d00fe026bfa63ca4",
      "parents": [
        "14fd403f2146f740942d78af4e0ee59396ad8eab"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:38 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: comment reminder in destroy_compound_page\n\nWarn destroy_compound_page that __split_huge_page_refcount is heavily\ndependent on its internal behavior.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "14fd403f2146f740942d78af4e0ee59396ad8eab",
      "tree": "c87734f6c6639684208d36548aa3687c6f460e23",
      "parents": [
        "2609ae6d10af0531e826335bd1445d1ace17c847"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:37 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: export maybe_mkwrite\n\nhuge_memory.c needs it too when it fallbacks in copying hugepages into\nregular fragmented pages if hugepage allocation fails during COW.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2609ae6d10af0531e826335bd1445d1ace17c847",
      "tree": "a5b464ae767f2ab3d19b6731374414502dbe430c",
      "parents": [
        "331127f799d1618e2ad978a0d220ed935a7b0ca8"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:37 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: no paravirt version of pmd ops\n\nNo paravirt version of set_pmd_at/pmd_update/pmd_update_defer.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "331127f799d1618e2ad978a0d220ed935a7b0ca8",
      "tree": "8a5d8a647939d13bdbba09379dca08fc9997cd95",
      "parents": [
        "0a47de52db04c5eb346e99a8d038e693689bedca"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:36 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: add pmd paravirt ops\n\nParavirt ops pmd_update/pmd_update_defer/pmd_set_at.  Not all might be\nnecessary (vmware needs pmd_update, Xen needs set_pmd_at, nobody needs\npmd_update_defer), but this is to keep full simmetry with pte paravirt\nops, which looks cleaner and simpler from a common code POV.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0a47de52db04c5eb346e99a8d038e693689bedca",
      "tree": "e1082844deb4406e59e724b0fd3ccbf6240386c1",
      "parents": [
        "8dd60a3a65c1b057bf0031d28436d3447a3c545b"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:35 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: add native_set_pmd_at\n\nUsed by paravirt and not paravirt set_pmd_at.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8dd60a3a65c1b057bf0031d28436d3447a3c545b",
      "tree": "19040d799dbf846191c8855450c662014ecec722",
      "parents": [
        "a5b338f2b0b1ff73ae20c66ab831201549eaec01"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:34 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: clear compound mapping\n\nClear compound mapping for anonymous compound pages like it already\nhappens for regular anonymous pages.  But crash if mapping is set for any\ntail page, also the PageAnon check is meaningless for tail pages.  This\ncheck only makes sense for the head page, for tail page it can only hide\nbugs and we definitely don\u0027t want to hide bugs.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a5b338f2b0b1ff73ae20c66ab831201549eaec01",
      "tree": "a89787ea6d932d66651c4621ed70f855e596d1ff",
      "parents": [
        "a95a82e96c48270980dd248ccd5546f1b49e6f8a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:34 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: update futex compound knowledge\n\nFutex code is smarter than most other gup_fast O_DIRECT code and knows\nabout the compound internals.  However now doing a put_page(head_page)\nwill not release the pin on the tail page taken by gup-fast, leading to\nall sort of refcounting bugchecks.  Getting a stable head_page is a little\ntricky.\n\npage_head \u003d page is there because if this is not a tail page it\u0027s also the\npage_head.  Only in case this is a tail page, compound_head is called,\notherwise it\u0027s guaranteed unnecessary.  And if it\u0027s a tail page\ncompound_head has to run atomically inside irq disabled section\n__get_user_pages_fast before returning.  Otherwise -\u003efirst_page won\u0027t be a\nstable pointer.\n\nDisableing irq before __get_user_page_fast and releasing irq after running\ncompound_head is needed because if __get_user_page_fast returns \u003d\u003d 1, it\nmeans the huge pmd is established and cannot go away from under us.\npmdp_splitting_flush_notify in __split_huge_page_splitting will have to\nwait for local_irq_enable before the IPI delivery can return.  This means\n__split_huge_page_refcount can\u0027t be running from under us, and in turn\nwhen we run compound_head(page) we\u0027re not reading a dangling pointer from\ntailpage-\u003efirst_page.  Then after we get to stable head page, we are\nalways safe to call compound_lock and after taking the compound lock on\nhead page we can finally re-check if the page returned by gup-fast is\nstill a tail page.  in which case we\u0027re set and we didn\u0027t need to split\nthe hugepage in order to take a futex on it.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a95a82e96c48270980dd248ccd5546f1b49e6f8a",
      "tree": "35f10c2a8d2cd0e1aa9d33f7a4f55332c0733ee6",
      "parents": [
        "9180706344487700b40da9eca5dedd3d11cb33b4"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:33 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: put_page: recheck PageHead after releasing the compound_lock\n\nAfter releasing the compound_lock split_huge_page can still run and release the\npage before put_page_testzero runs.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9180706344487700b40da9eca5dedd3d11cb33b4",
      "tree": "eb0347efe7e40adc78a271752c7382aa67875d6a",
      "parents": [
        "e9da73d67729b58bba256123e2b4651e0d8a01ac"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:32 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:39 2011 -0800"
      },
      "message": "thp: alter compound get_page/put_page\n\nAlter compound get_page/put_page to keep references on subpages too, in\norder to allow __split_huge_page_refcount to split an hugepage even while\nsubpages have been pinned by one of the get_user_pages() variants.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e9da73d67729b58bba256123e2b4651e0d8a01ac",
      "tree": "5e7f8c4d394d625f7832cbd04a8d55f9f0cd0d95",
      "parents": [
        "a826e422420b461a6247137c292ff83c4800354a"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:32 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: compound_lock\n\nAdd a new compound_lock() needed to serialize put_page against\n__split_huge_page_refcount().\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a826e422420b461a6247137c292ff83c4800354a",
      "tree": "803e3aeb39606e2fe58daa238c454b335aa25cbc",
      "parents": [
        "1c9bf22c09ae14d65225d9b9619b2eb357350cd7"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:31 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: mm: define MADV_HUGEPAGE\n\nDefine MADV_HUGEPAGE.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1c9bf22c09ae14d65225d9b9619b2eb357350cd7",
      "tree": "598adf6bb003c8194bd24f250e9f51edc767468c",
      "parents": [
        "4e9f64c42d0ba5eb0c78569435ada4c224332ce4"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:30 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: transparent hugepage support documentation\n\nDocumentation/vm/transhuge.txt\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4e9f64c42d0ba5eb0c78569435ada4c224332ce4",
      "tree": "71df9e94a7f400755bd9ae02ed0c183e429f91cf",
      "parents": [
        "ae52a2adb5afa5ac5ec5fb5c7b24777f84b6c926"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Jan 13 15:46:29 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: fix bad_page to show the real reason the page is bad\n\npage_count shows the count of the head page, but the actual check is done\non the tail page, so show what is really being checked.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ae52a2adb5afa5ac5ec5fb5c7b24777f84b6c926",
      "tree": "fb02d8fb1699c85cc278e2333ce25916835bf341",
      "parents": [
        "240c879f20a605346705be24253bc9fc6fa8a106"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hughd@google.com",
        "time": "Thu Jan 13 15:46:28 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "thp: ksm: free swap when swapcache page is replaced\n\nWhen a swapcache page is replaced by a ksm page, it\u0027s best to free that\nswap immediately.\n\nReported-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "240c879f20a605346705be24253bc9fc6fa8a106",
      "tree": "85c38509483aa5f69d3dea5daa21412dd2e6aced",
      "parents": [
        "ecb256f815232b35ae8382cff36ca8ce0bbd077e"
      ],
      "author": {
        "name": "Minchan Kim",
        "email": "minchan.kim@gmail.com",
        "time": "Thu Jan 13 15:46:27 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:38 2011 -0800"
      },
      "message": "writeback: avoid unnecessary determine_dirtyable_memory call\n\nI think determine_dirtyable_memory() is a rather costly function since it\nneed many atomic reads for gathering zone/global page state.  But when we\nuse vm_dirty_bytes \u0026\u0026 dirty_background_bytes, we don\u0027t need that costly\ncalculation.\n\nThis patch eliminates such unnecessary overhead.\n\nNOTE : newly added if condition might add overhead in normal path.\n       But it should be _really_ small because anyway we need the\n       access both vm_dirty_bytes and dirty_background_bytes so it is\n       likely to hit the cache.\n\n[akpm@linux-foundation.org: fix used-uninitialised warning]\nSigned-off-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ecb256f815232b35ae8382cff36ca8ce0bbd077e",
      "tree": "4f488ba29b5bf860576a3a2e405607a9c32048bf",
      "parents": [
        "dc83edd941f412e938841b4989be24aa288a1aa6"
      ],
      "author": {
        "name": "Volodymyr G. Lukiianyk",
        "email": "volodymyrgl@gmail.com",
        "time": "Thu Jan 13 15:46:26 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: set correct numa_zonelist_order string when configured on the kernel command line\n\nWhen numa_zonelist_order parameter is set to \"node\" or \"zone\" on the\ncommand line it\u0027s still showing as \"default\" in sysctl.  That\u0027s because\nearly_param parsing function changes only user_zonelist_order variable.\nFix this by copying user-provided string to numa_zonelist_order if it was\nsuccessfully parsed.\n\nSigned-off-by: Volodymyr G Lukiianyk \u003cvolodymyrgl@gmail.com\u003e\nAcked-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dc83edd941f412e938841b4989be24aa288a1aa6",
      "tree": "07dbc04d544f3200b3b13be1af6c57f44ffa63c8",
      "parents": [
        "355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:26 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: use the classzone idx that kswapd was using for sleeping_prematurely()\n\nWhen kswapd is woken up for a high-order allocation, it takes account of\nthe highest usable zone by the caller (the classzone idx).  During\nallocation, this index is used to select the lowmem_reserve[] that should\nbe applied to the watermark calculation in zone_watermark_ok().\n\nWhen balancing a node, kswapd considers the highest unbalanced zone to be\nthe classzone index.  This will always be at least be the callers\nclasszone_idx and can be higher.  However, sleeping_prematurely() always\nconsiders the lowest zone (e.g.  ZONE_DMA) to be the classzone index.\nThis means that sleeping_prematurely() can consider a zone to be balanced\nthat is unusable by the allocation request that originally woke kswapd.\nThis patch changes sleeping_prematurely() to use a classzone_idx matching\nthe value it used in balance_pgdat().\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b",
      "tree": "26be6f89cac5b6f5b321cf74103444ae8775c3eb",
      "parents": [
        "4d40502ea580c35414a1466d86f96484910ebaec"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:24 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: treat zone-\u003eall_unreclaimable in sleeping_prematurely similar to balance_pgdat()\n\nAfter DEF_PRIORITY, balance_pgdat() considers all_unreclaimable zones to\nbe balanced but sleeping_prematurely does not.  This can force kswapd to\nstay awake longer than it should.  This patch fixes it.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "4d40502ea580c35414a1466d86f96484910ebaec",
      "tree": "ed03d2b5a100be1c3371d304421af221fa893129",
      "parents": [
        "0abdee2bd4118366c62349a304f81537be69af33"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:23 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: reset kswapd_max_order and classzone_idx after reading\n\nWhen kswapd wakes up, it reads its order and classzone from pgdat and\ncalls balance_pgdat.  While its awake, it potentially reclaimes at a high\norder and a low classzone index.  This might have been a once-off that was\nnot required by subsequent callers.  However, because the pgdat values\nwere not reset, they remain artifically high while balance_pgdat() is\nrunning and potentially kswapd enters a second unnecessary reclaim cycle.\nReset the pgdat order and classzone index after reading.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "0abdee2bd4118366c62349a304f81537be69af33",
      "tree": "c013abd2dd49b3837d033eb4d32dfb57984d273e",
      "parents": [
        "1741c87757448cedd03224f01586504f9256415d"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:22 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: use the order that kswapd was reclaiming at for sleeping_prematurely()\n\nBefore kswapd goes to sleep, it uses sleeping_prematurely() to check if\nthere was a race pushing a zone below its watermark.  If the race\nhappened, it stays awake.  However, balance_pgdat() can decide to reclaim\nat order-0 if it decides that high-order reclaim is not working as\nexpected.  This information is not passed back to sleeping_prematurely().\nThe impact is that kswapd remains awake reclaiming pages long after it\nshould have gone to sleep.  This patch passes the adjusted order to\nsleeping_prematurely and uses the same logic as balance_pgdat to decide if\nit\u0027s ok to go to sleep.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1741c87757448cedd03224f01586504f9256415d",
      "tree": "e8f3bace5f0cd1652a3a2a682189b19f7b3af875",
      "parents": [
        "9950474883e027e6e728cbcff25f7f2bf0c96530"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:21 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: keep kswapd awake for high-order allocations until a percentage of the node is balanced\n\nWhen reclaiming for high-orders, kswapd is responsible for balancing a\nnode but it should not reclaim excessively.  It avoids excessive reclaim\nby considering if any zone in a node is balanced then the node is\nbalanced.  In the cases where there are imbalanced zone sizes (e.g.\nZONE_DMA with both ZONE_DMA32 and ZONE_NORMAL), kswapd can go to sleep\nprematurely as just one small zone was balanced.\n\nThis alters the sleep logic of kswapd slightly.  It counts the number of\npages that make up the balanced zones.  If the total number of balanced\npages is more than a quarter of the zone, kswapd will go back to sleep.\nThis should keep a node balanced without reclaiming an excessive number of\npages.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9950474883e027e6e728cbcff25f7f2bf0c96530",
      "tree": "ecfdd3e68a25f1ef7822428c44f8375efbe9bc0c",
      "parents": [
        "c585a2678d83ba8fb02fa6b197de0ac7d67377f1"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:20 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:37 2011 -0800"
      },
      "message": "mm: kswapd: stop high-order balancing when any suitable zone is balanced\n\nSimon Kirby reported the following problem\n\n   We\u0027re seeing cases on a number of servers where cache never fully\n   grows to use all available memory.  Sometimes we see servers with 4 GB\n   of memory that never seem to have less than 1.5 GB free, even with a\n   constantly-active VM.  In some cases, these servers also swap out while\n   this happens, even though they are constantly reading the working set\n   into memory.  We have been seeing this happening for a long time; I\n   don\u0027t think it\u0027s anything recent, and it still happens on 2.6.36.\n\nAfter some debugging work by Simon, Dave Hansen and others, the prevaling\ntheory became that kswapd is reclaiming order-3 pages requested by SLUB\ntoo aggressive about it.\n\nThere are two apparent problems here.  On the target machine, there is a\nsmall Normal zone in comparison to DMA32.  As kswapd tries to balance all\nzones, it would continually try reclaiming for Normal even though DMA32\nwas balanced enough for callers.  The second problem is that\nsleeping_prematurely() does not use the same logic as balance_pgdat() when\ndeciding whether to sleep or not.  This keeps kswapd artifically awake.\n\nA number of tests were run and the figures from previous postings will\nlook very different for a few reasons.  One, the old figures were forcing\nmy network card to use GFP_ATOMIC in attempt to replicate Simon\u0027s problem.\n Second, I previous specified slub_min_order\u003d3 again in an attempt to\nreproduce Simon\u0027s problem.  In this posting, I\u0027m depending on Simon to say\nwhether his problem is fixed or not and these figures are to show the\nimpact to the ordinary cases.  Finally, the \"vmscan\" figures are taken\nfrom /proc/vmstat instead of the tracepoints.  There is less information\nbut recording is less disruptive.\n\nThe first test of relevance was postmark with a process running in the\nbackground reading a large amount of anonymous memory in blocks.  The\nobjective was to vaguely simulate what was happening on Simon\u0027s machine\nand it\u0027s memory intensive enough to have kswapd awake.\n\nPOSTMARK\n                                            traceonly          kanyzone\nTransactions per second:              156.00 ( 0.00%)   153.00 (-1.96%)\nData megabytes read per second:        21.51 ( 0.00%)    21.52 ( 0.05%)\nData megabytes written per second:     29.28 ( 0.00%)    29.11 (-0.58%)\nFiles created alone per second:       250.00 ( 0.00%)   416.00 (39.90%)\nFiles create/transact per second:      79.00 ( 0.00%)    76.00 (-3.95%)\nFiles deleted alone per second:       520.00 ( 0.00%)   420.00 (-23.81%)\nFiles delete/transact per second:      79.00 ( 0.00%)    76.00 (-3.95%)\n\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)         16.58      17.4\nTotal Elapsed Time (seconds)                218.48    222.47\n\nVMstat Reclaim Statistics: vmscan\nDirect reclaims                                  0          4\nDirect reclaim pages scanned                     0        203\nDirect reclaim pages reclaimed                   0        184\nKswapd pages scanned                        326631     322018\nKswapd pages reclaimed                      312632     309784\nKswapd low wmark quickly                         1          4\nKswapd high wmark quickly                      122        475\nKswapd skip congestion_wait                      1          0\nPages activated                             700040     705317\nPages deactivated                           212113     203922\nPages written                                 9875       6363\n\nTotal pages scanned                         326631    322221\nTotal pages reclaimed                       312632    309968\n%age total pages scanned/reclaimed          95.71%    96.20%\n%age total pages scanned/written             3.02%     1.97%\n\nproc vmstat: Faults\nMajor Faults                                   300       254\nMinor Faults                                645183    660284\nPage ins                                    493588    486704\nPage outs                                  4960088   4986704\nSwap ins                                      1230       661\nSwap outs                                     9869      6355\n\nPerformance is mildly affected because kswapd is no longer doing as much\nwork and the background memory consumer process is getting in the way.\nNote that kswapd scanned and reclaimed fewer pages as it\u0027s less aggressive\nand overall fewer pages were scanned and reclaimed.  Swap in/out is\nparticularly reduced again reflecting kswapd throwing out fewer pages.\n\nThe slight performance impact is unfortunate here but it looks like a\ndirect result of kswapd being less aggressive.  As the bug report is about\ntoo many pages being freed by kswapd, it may have to be accepted for now.\n\nThe second test is a streaming IO benchmark that was previously used by\nJohannes to show regressions in page reclaim.\n\nMICRO\n\t\t\t\t\t traceonly  kanyzone\nUser/Sys Time Running Test (seconds)         29.29     28.87\nTotal Elapsed Time (seconds)                492.18    488.79\n\nVMstat Reclaim Statistics: vmscan\nDirect reclaims                               2128       1460\nDirect reclaim pages scanned               2284822    1496067\nDirect reclaim pages reclaimed              148919     110937\nKswapd pages scanned                      15450014   16202876\nKswapd pages reclaimed                     8503697    8537897\nKswapd low wmark quickly                      3100       3397\nKswapd high wmark quickly                     1860       7243\nKswapd skip congestion_wait                    708        801\nPages activated                               9635       9573\nPages deactivated                             1432       1271\nPages written                                  223       1130\n\nTotal pages scanned                       17734836  17698943\nTotal pages reclaimed                      8652616   8648834\n%age total pages scanned/reclaimed          48.79%    48.87%\n%age total pages scanned/written             0.00%     0.01%\n\nproc vmstat: Faults\nMajor Faults                                   165       221\nMinor Faults                               9655785   9656506\nPage ins                                      3880      7228\nPage outs                                 37692940  37480076\nSwap ins                                         0        69\nSwap outs                                       19        15\n\nAgain fewer pages are scanned and reclaimed as expected and this time the\ntest completed faster.  Note that kswapd is hitting its watermarks faster\n(low and high wmark quickly) which I expect is due to kswapd reclaiming\nfewer pages.\n\nI also ran fs-mark, iozone and sysbench but there is nothing interesting\nto report in the figures.  Performance is not significantly changed and\nthe reclaim statistics look reasonable.\n\nTgis patch:\n\nWhen the allocator enters its slow path, kswapd is woken up to balance the\nnode.  It continues working until all zones within the node are balanced.\nFor order-0 allocations, this makes perfect sense but for higher orders it\ncan have unintended side-effects.  If the zone sizes are imbalanced,\nkswapd may reclaim heavily within a smaller zone discarding an excessive\nnumber of pages.  The user-visible behaviour is that kswapd is awake and\nreclaiming even though plenty of pages are free from a suitable zone.\n\nThis patch alters the \"balance\" logic for high-order reclaim allowing\nkswapd to stop if any suitable zone becomes balanced to reduce the number\nof pages it reclaims from other zones.  kswapd still tries to ensure that\norder-0 watermarks for all zones are met before sleeping.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nReviewed-by: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nReviewed-by: Eric B Munson \u003cemunson@mgebm.net\u003e\nCc: Simon Kirby \u003csim@hostway.ca\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Shaohua Li \u003cshaohua.li@intel.com\u003e\nCc: Dave Hansen \u003cdave@linux.vnet.ibm.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c585a2678d83ba8fb02fa6b197de0ac7d67377f1",
      "tree": "b722f3c6fa28d1228e34adbcb85fee8683b34069",
      "parents": [
        "e20e87795834f2f14cb53baf657b91d9c39f92c8"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "srostedt@redhat.com",
        "time": "Thu Jan 13 15:46:18 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: remove likely() from grab_cache_page_write_begin()\n\nRunning the annotated branch profiler on a box doing average work\n(firefox, evolution, xchat, distcc farm), the likely() used in\ngrab_cache_page_write_begin() was incorrect most of the time:\n\n correct incorrect  %        Function                  File              Line\n ------- ---------  -        --------                  ----              ----\n 1924262 71332401  97 grab_cache_page_write_begin    filemap.c           2206\n\nAdding a trace_printk() and running the function tracer limited to\njust this function I can see:\n\n        gconfd-2-2696  [000]  4467.268935: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d7\n        gconfd-2-2696  [000]  4467.268946: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268947: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d8\n        gconfd-2-2696  [000]  4467.268959: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268960: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d9\n        gconfd-2-2696  [000]  4467.268972: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268973: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d10\n        gconfd-2-2696  [000]  4467.268991: grab_cache_page_write_begin \u003c-ext3_write_begin\n        gconfd-2-2696  [000]  4467.268992: grab_cache_page_write_begin: page\u003d          (null) mapping\u003dffff8800676a9460 index\u003d11\n        gconfd-2-2696  [000]  4467.269005: grab_cache_page_write_begin \u003c-ext3_write_begin\n\nWhich shows that a lot of calls from ext3_write_begin will result in the\npage returned by \"find_lock_page\" will be NULL.\n\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nAcked-by: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e20e87795834f2f14cb53baf657b91d9c39f92c8",
      "tree": "0ec2c10b0ed4cb572c73153b56c017db536bc056",
      "parents": [
        "088e54658f559a13c2b988086512d76fe9e8f846"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "srostedt@redhat.com",
        "time": "Thu Jan 13 15:46:17 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: remove unlikely() from page_mapping()\n\npage_mapping() has a unlikely that the mapping has PAGE_MAPPING_ANON set.\nBut running the annotated branch profiler on a normal desktop system doing\nvairous tasks (xchat, evolution, firefox, distcc), it is not really that\nunlikely that the mapping here will have the PAGE_MAPPING_ANON flag set:\n\n correct incorrect  %        Function                  File              Line\n ------- ---------  -        --------                  ----              ----\n35935762 1270265395  97 page_mapping                   mm.h                 659\n1306198001   143659   0 page_mapping                   mm.h                 657\n203131478   121586   0 page_mapping                   mm.h                 657\n 5415491     1116   0 page_mapping                   mm.h                 657\n74899487     1116   0 page_mapping                   mm.h                 657\n203132845      224   0 page_mapping                   mm.h                 659\n 5415464       27   0 page_mapping                   mm.h                 659\n   13552        0   0 page_mapping                   mm.h                 657\n   13552        0   0 page_mapping                   mm.h                 659\n  242630        0   0 page_mapping                   mm.h                 657\n  242630        0   0 page_mapping                   mm.h                 659\n74899487        0   0 page_mapping                   mm.h                 659\n\nThe page_mapping() is a static inline, which is why it shows up multiple\ntimes.\n\nThe unlikely in page_mapping() was correct a total of 1909540379 times and\nincorrect 1270533123 times, with a 39% being incorrect.  With this much of\nan error, it\u0027s best to simply remove the unlikely and have the compiler\nand branch prediction figure this out.\n\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Lee Schermerhorn \u003cLee.Schermerhorn@hp.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "088e54658f559a13c2b988086512d76fe9e8f846",
      "tree": "35a5e0f82186dfa740751ec33f2fcdd90e347b0b",
      "parents": [
        "ddf9c6d472825ceda66b3adff0f6437dbcd37f71"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "srostedt@redhat.com",
        "time": "Thu Jan 13 15:46:16 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: remove likely() from mapping_unevictable()\n\nThe mapping_unevictable() has a likely() around the mapping parameter.\nThis mapping parameter comes from page_mapping() which has an unlikely()\nthat the page will be set as PAGE_MAPPING_ANON, and if so, it will return\nNULL.  One would think that this unlikely() means that the mapping\nreturned by page_mapping() would not be NULL, but where page_mapping() is\nused just above mapping_unevictable(), that unlikely() is incorrect most\nof the time.  This means that the \"likely(mapping)\" in\nmapping_unevictable() is incorrect most of the time.\n\nRunning the annotated branch profiler on my main box which runs firefox,\nevolution, xchat and is part of my distcc farm, I had this:\n\n correct incorrect  %        Function                  File              Line\n ------- ---------  -        --------                  ----              ----\n12872836 1269443893  98 mapping_unevictable            pagemap.h            51\n35935762 1270265395  97 page_mapping                   mm.h                 659\n1306198001   143659   0 page_mapping                   mm.h                 657\n203131478   121586   0 page_mapping                   mm.h                 657\n 5415491     1116   0 page_mapping                   mm.h                 657\n74899487     1116   0 page_mapping                   mm.h                 657\n203132845      224   0 page_mapping                   mm.h                 659\n 5415464       27   0 page_mapping                   mm.h                 659\n   13552        0   0 page_mapping                   mm.h                 657\n   13552        0   0 page_mapping                   mm.h                 659\n  242630        0   0 page_mapping                   mm.h                 657\n  242630        0   0 page_mapping                   mm.h                 659\n74899487        0   0 page_mapping                   mm.h                 659\n\nThe page_mapping() is a static inline, which is why it shows up multiple\ntimes.  The mapping_unevictable() is also a static inline but seems to be\nused only once in my setup.\n\nThe unlikely in page_mapping() was correct a total of 1909540379 times and\nincorrect 1270533123 times, with a 39% being incorrect.  Perhaps this is\nenough to remove the unlikely from page_mapping() as well.\n\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nAcked-by: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nAcked-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Lee Schermerhorn \u003cLee.Schermerhorn@hp.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ddf9c6d472825ceda66b3adff0f6437dbcd37f71",
      "tree": "a838e5535d5bad4391dcec4584d44a0e3b05858b",
      "parents": [
        "1e50df39f6e2c3a4a3394df62baa8a213df16c54"
      ],
      "author": {
        "name": "Tobias Klauser",
        "email": "tklauser@distanz.ch",
        "time": "Thu Jan 13 15:46:15 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "vmalloc: remove redundant unlikely()\n\nIS_ERR() already implies unlikely(), so it can be omitted here.\n\nSigned-off-by: Tobias Klauser \u003ctklauser@distanz.ch\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1e50df39f6e2c3a4a3394df62baa8a213df16c54",
      "tree": "d437981aec4fc5cf84178f7afcca83f0ef40aea1",
      "parents": [
        "53a7706d5ed8f1a53ba062b318773160cc476dde"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Jan 13 15:46:14 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mempolicy: remove tasklist_lock from migrate_pages\n\nToday, tasklist_lock in migrate_pages doesn\u0027t protect anything.\nrcu_read_lock() provide enough protection from pid hash walk.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReported-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Christoph Lameter \u003ccl@linux-foundation.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "53a7706d5ed8f1a53ba062b318773160cc476dde",
      "tree": "a1990d90d5af3686b7a83b2bbc2ae6463971efc5",
      "parents": [
        "5fdb2002131cd4e210b9638a4fc932ec7be491d1"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:14 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mlock: do not hold mmap_sem for extended periods of time\n\n__get_user_pages gets a new \u0027nonblocking\u0027 parameter to signal that the\ncaller is prepared to re-acquire mmap_sem and retry the operation if\nneeded.  This is used to split off long operations if they are going to\nblock on a disk transfer, or when we detect contention on the mmap_sem.\n\n[akpm@linux-foundation.org: remove ref to rwsem_is_contended()]\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5fdb2002131cd4e210b9638a4fc932ec7be491d1",
      "tree": "233dc1cab275397d211a7d5490f19192a59a47fd",
      "parents": [
        "110d74a921f4d272b47ef6104fcf937df808f4c8"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:12 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: move VM_LOCKED check to __mlock_vma_pages_range()\n\nUse a single code path for faulting in pages during mlock.\n\nThe reason to have it in this patch series is that I did not want to\nupdate both code paths in a later change that releases mmap_sem when\nblocking on disk.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "110d74a921f4d272b47ef6104fcf937df808f4c8",
      "tree": "a2f1705e049f06e1cf8cbaf7d6b3261f0b46b6ab",
      "parents": [
        "fed067da46ad3b9acedaf794a5f05d0bc153280b"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:11 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:36 2011 -0800"
      },
      "message": "mm: add FOLL_MLOCK follow_page flag.\n\nMove the code to mlock pages from __mlock_vma_pages_range() to\nfollow_page().\n\nThis allows __mlock_vma_pages_range() to not have to break down work into\n16-page batches.\n\nAn additional motivation for doing this within the present patch series is\nthat it\u0027ll make it easier for a later chagne to drop mmap_sem when\nblocking on disk (we\u0027d like to be able to resume at the page that was read\nfrom disk instead of at the start of a 16-page batch).\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "fed067da46ad3b9acedaf794a5f05d0bc153280b",
      "tree": "ba2eadd8c3c2884d15a5a9373924b33b40bdca7e",
      "parents": [
        "5ecfda041e4b4bd858d25bbf5a16c2a6c06d7272"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:10 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "mlock: only hold mmap_sem in shared mode when faulting in pages\n\nCurrently mlock() holds mmap_sem in exclusive mode while the pages get\nfaulted in.  In the case of a large mlock, this can potentially take a\nvery long time, during which various commands such as \u0027ps auxw\u0027 will\nblock.  This makes sysadmins unhappy:\n\nreal    14m36.232s\nuser    0m0.003s\nsys     0m0.015s\n(output from \u0027time ps auxw\u0027 while a 20GB file was being mlocked without\nbeing previously preloaded into page cache)\n\nI propose that mlock() could release mmap_sem after the VM_LOCKED bits\nhave been set in all appropriate VMAs.  Then a second pass could be done\nto actually mlock the pages, in small batches, releasing mmap_sem when we\nblock on disk access or when we detect some contention.\n\nThis patch:\n\nBefore this change, mlock() holds mmap_sem in exclusive mode while the\npages get faulted in.  In the case of a large mlock, this can potentially\ntake a very long time.  Various things will block while mmap_sem is held,\nincluding \u0027ps auxw\u0027.  This can make sysadmins angry.\n\nI propose that mlock() could release mmap_sem after the VM_LOCKED bits\nhave been set in all appropriate VMAs.  Then a second pass could be done\nto actually mlock the pages with mmap_sem held for reads only.  We need to\nrecheck the vma flags after we re-acquire mmap_sem, but this is easy.\n\nIn the case where a vma has been munlocked before mlock completes, pages\nthat were already marked as PageMlocked() are handled by the munlock()\ncall, and mlock() is careful to not mark new page batches as PageMlocked()\nafter the munlock() call has cleared the VM_LOCKED vma flags.  So, the end\nresult will be identical to what\u0027d happen if munlock() had executed after\nthe mlock() call.\n\nIn a later change, I will allow the second pass to release mmap_sem when\nblocking on disk accesses or when it is otherwise contended, so that it\nwon\u0027t be held for long periods of time even in shared mode.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nTested-by: Valdis Kletnieks \u003cValdis.Kletnieks@vt.edu\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5ecfda041e4b4bd858d25bbf5a16c2a6c06d7272",
      "tree": "e6c3e7dac64a5e45b48ab7836318752202579a17",
      "parents": [
        "72ddc8f72270758951ccefb7d190f364d20215ab"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:09 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "mlock: avoid dirtying pages and triggering writeback\n\nWhen faulting in pages for mlock(), we want to break COW for anonymous or\nfile pages within VM_WRITABLE, non-VM_SHARED vmas.  However, there is no\nneed to write-fault into VM_SHARED vmas since shared file pages can be\nmlocked first and dirtied later, when/if they actually get written to.\nSkipping the write fault is desirable, as we don\u0027t want to unnecessarily\ncause these pages to be dirtied and queued for writeback.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Kosaki Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Theodore Tso \u003ctytso@google.com\u003e\nCc: Michael Rubin \u003cmrubin@google.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "72ddc8f72270758951ccefb7d190f364d20215ab",
      "tree": "11772272825f72aa3f32c0f9be5cf35155cf1441",
      "parents": [
        "b009c024ff0059e293c1937516f2defe56263650"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:08 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "do_wp_page: clarify dirty_page handling\n\nReorganize the code so that dirty pages are handled closer to the place\nthat makes them dirty (handling write fault into shared, writable VMAs).\nNo behavior changes.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Kosaki Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Theodore Tso \u003ctytso@google.com\u003e\nCc: Michael Rubin \u003cmrubin@google.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b009c024ff0059e293c1937516f2defe56263650",
      "tree": "35d71c837b954e884c429c9c36a85aaf7b033c49",
      "parents": [
        "212260aa07135b327752dc02625c68cf4ce04caf"
      ],
      "author": {
        "name": "Michel Lespinasse",
        "email": "walken@google.com",
        "time": "Thu Jan 13 15:46:07 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "do_wp_page: remove the \u0027reuse\u0027 flag\n\nmlocking a shared, writable vma currently causes the corresponding pages\nto be marked as dirty and queued for writeback.  This seems rather\nunnecessary given that the pages are not being actually modified during\nmlock.  It is understood that for non-shared mappings (file or anon) we\nwant to use a write fault in order to break COW, but there is just no such\nneed for shared mappings.\n\nThe first two patches in this series do not introduce any behavior change.\n The intent there is to make it obvious that dirtying file pages is only\ndone in the (writable, shared) case.  I think this clarifies the code, but\nI wouldn\u0027t mind dropping these two patches if there is no consensus about\nthem.\n\nThe last patch is where we actually avoid dirtying shared mappings during\nmlock.  Note that as a side effect of this, we won\u0027t call page_mkwrite()\nfor the mappings that define it, and won\u0027t be pre-allocating data blocks\nat the FS level if the mapped file was sparsely allocated.  My\nunderstanding is that mlock does not need to provide such guarantee, as\nevidenced by the fact that it never did for the filesystems that don\u0027t\ndefine page_mkwrite() - including some common ones like ext3.  However, I\nwould like to gather feedback on this from filesystem people as a\nprecaution.  If this turns out to be a showstopper, maybe block\npreallocation can be added back on using a different interface.\n\nLarge shared mlocks are getting significantly (\u003e2x) faster in my tests, as\nthe disk can be fully used for reading the file instead of having to share\nbetween this and writeback.\n\nThis patch:\n\nReorganize the code to remove the \u0027reuse\u0027 flag.  No behavior changes.\n\nSigned-off-by: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Kosaki Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nCc: Theodore Tso \u003ctytso@google.com\u003e\nCc: Michael Rubin \u003cmrubin@google.com\u003e\nCc: Suleiman Souhlal \u003csuleiman@google.com\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "212260aa07135b327752dc02625c68cf4ce04caf",
      "tree": "7ea25dddf5f69e91ec4b3d22f940e6c9604c7f93",
      "parents": [
        "dabb16f639820267b3850d804571c70bd93d4e07"
      ],
      "author": {
        "name": "Rik van Riel",
        "email": "riel@redhat.com",
        "time": "Thu Jan 13 15:46:06 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "mm: clear PageError bit in msync \u0026 fsync\n\nTemporary IO failures, eg.  due to loss of both multipath paths, can\npermanently leave the PageError bit set on a page, resulting in msync or\nfsync returning -EIO over and over again, even if IO is now getting to the\ndisk correctly.\n\nWe already clear the AS_ENOSPC and AS_IO bits in mapping-\u003eflags in the\nfilemap_fdatawait_range function.  Also clearing the PageError bit on the\npage allows subsequent msync or fsync calls on this file to return without\nan error, if the subsequent IO succeeds.\n\nUnfortunately data written out in the msync or fsync call that returned\n-EIO can still get lost, because the page dirty bit appears to not get\nrestored on IO error.  However, the alternative could be potentially all\nof memory filling up with uncleanable dirty pages, hanging the system, so\nthere is no nice choice here...\n\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Valerie Aurora \u003cvaurora@redhat.com\u003e\nAcked-by: Jeff Layton \u003cjlayton@redhat.com\u003e\nCc: Theodore Ts\u0027o \u003ctytso@mit.edu\u003e\nAcked-by: Jan Kara \u003cjack@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": "dabb16f639820267b3850d804571c70bd93d4e07",
      "tree": "7da59e6133cd2f820389574ac9206c56e046f5d4",
      "parents": [
        "d0a21265dfb5fa8ae54e90d0fb6d1c215b10a28a"
      ],
      "author": {
        "name": "Mandeep Singh Baines",
        "email": "msb@chromium.org",
        "time": "Thu Jan 13 15:46:05 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:35 2011 -0800"
      },
      "message": "oom: allow a non-CAP_SYS_RESOURCE proces to oom_score_adj down\n\nWe\u0027d like to be able to oom_score_adj a process up/down as it\nenters/leaves the foreground.  Currently, it is not possible to oom_adj\ndown without CAP_SYS_RESOURCE.  This patch allows a task to decrease its\noom_score_adj back to the value that a CAP_SYS_RESOURCE thread set it to\nor its inherited value at fork.  Assuming the thread that has forked it\nhas oom_score_adj of 0, each process could decrease it back from 0 upon\nactivation unless a CAP_SYS_RESOURCE thread elevated it to something\nhigher.\n\nAlternative considered:\n\n* a setuid binary\n* a daemon with CAP_SYS_RESOURCE\n\nSince you don\u0027t wan\u0027t all processes to be able to reduce their oom_adj, a\nsetuid or daemon implementation would be complex.  The alternatives also\nhave much higher overhead.\n\nThis patch updated from original patch based on feedback from David\nRientjes.\n\nSigned-off-by: Mandeep Singh Baines \u003cmsb@chromium.org\u003e\nAcked-by: David Rientjes \u003crientjes@google.com\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Ying Han \u003cyinghan@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d0a21265dfb5fa8ae54e90d0fb6d1c215b10a28a",
      "tree": "a3bf2c96ad8e180f32a52e208667a40bb972275b",
      "parents": [
        "ec3f64fc9c196a304c4b7db3e1ff56d640628509"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Thu Jan 13 15:46:02 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: unify module_alloc code for vmalloc\n\nFour architectures (arm, mips, sparc, x86) use __vmalloc_area() for\nmodule_init().  Much of the code is duplicated and can be generalized in a\nglobally accessible function, __vmalloc_node_range().\n\n__vmalloc_node() now calls into __vmalloc_node_range() with a range of\n[VMALLOC_START, VMALLOC_END) for functionally equivalent behavior.\n\nEach architecture may then use __vmalloc_node_range() directly to remove\nthe duplication of code.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: Russell King \u003clinux@arm.linux.org.uk\u003e\nCc: Ralf Baechle \u003cralf@linux-mips.org\u003e\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ec3f64fc9c196a304c4b7db3e1ff56d640628509",
      "tree": "43de86d9fbb6543b99e1f450b1a3c15a3f151fa0",
      "parents": [
        "e5a5623b28198aa91ea71ee5d3846757fc76bc87"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Thu Jan 13 15:46:01 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: remove gfp mask from pcpu_get_vm_areas\n\npcpu_get_vm_areas() only uses GFP_KERNEL allocations, so remove the gfp_t\nformal and use the mask internally.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e5a5623b28198aa91ea71ee5d3846757fc76bc87",
      "tree": "6fad408973a428a0ca2bdffd0c30a7c5af400ec9",
      "parents": [
        "f3a310bc4e5ce7e55e1c8e25c31e63af017f3e50"
      ],
      "author": {
        "name": "David Rientjes",
        "email": "rientjes@google.com",
        "time": "Thu Jan 13 15:46:00 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: remove unused get_vm_area_node\n\nget_vm_area_node() is unused in the kernel and can thus be removed.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Christoph Lameter \u003ccl@linux.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f3a310bc4e5ce7e55e1c8e25c31e63af017f3e50",
      "tree": "0c78777bd505f44edeb9bbcc50fb3154896574aa",
      "parents": [
        "9927af740b1b9b1e769310bd0b91425e8047b803"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:46:00 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: vmscan: rename lumpy_mode to reclaim_mode\n\nWith compaction being used instead of lumpy reclaim, the name lumpy_mode\nand associated variables is a bit misleading.  Rename lumpy_mode to\nreclaim_mode which is a better fit.  There is no functional change.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9927af740b1b9b1e769310bd0b91425e8047b803",
      "tree": "5195dfbe36ece987f7e3d7c04b87327a20b16ea6",
      "parents": [
        "7f0f24967b0349798803260b2e4bf347cffa1990"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:59 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: compaction: perform a faster migration scan when migrating asynchronously\n\ntry_to_compact_pages() is initially called to only migrate pages\nasychronously and kswapd always compacts asynchronously.  Both are being\noptimistic so it is important to complete the work as quickly as possible\nto minimise stalls.\n\nThis patch alters the scanner when asynchronous to only consider\nMIGRATE_MOVABLE pageblocks as migration candidates.  This reduces stalls\nwhen allocating huge pages while not impairing allocation success rates as\na full scan will be performed if necessary after direct reclaim.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "7f0f24967b0349798803260b2e4bf347cffa1990",
      "tree": "80448367dd2403f02e74f90671e1f050aea41292",
      "parents": [
        "77f1fe6b08b13a87391549c8a820ddc817b6f50e"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:58 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: migration: cleanup migrate_pages API by matching types for offlining and sync\n\nWith the introduction of the boolean sync parameter, the API looks a\nlittle inconsistent as offlining is still an int.  Convert offlining to a\nbool for the sake of being tidy.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "77f1fe6b08b13a87391549c8a820ddc817b6f50e",
      "tree": "720865bd0994da3787b6f37d33b2ee4c26a2de6c",
      "parents": [
        "3e7d344970673c5334cf7b5bb27c8c0942b06126"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:57 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:34 2011 -0800"
      },
      "message": "mm: migration: allow migration to operate asynchronously and avoid synchronous compaction in the faster path\n\nMigration synchronously waits for writeback if the initial passes fails.\nCallers of memory compaction do not necessarily want this behaviour if the\ncaller is latency sensitive or expects that synchronous migration is not\ngoing to have a significantly better success rate.\n\nThis patch adds a sync parameter to migrate_pages() allowing the caller to\nindicate if wait_on_page_writeback() is allowed within migration or not.\nFor reclaim/compaction, try_to_compact_pages() is first called\nasynchronously, direct reclaim runs and then try_to_compact_pages() is\ncalled synchronously as there is a greater expectation that it\u0027ll succeed.\n\n[akpm@linux-foundation.org: build/merge fix]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3e7d344970673c5334cf7b5bb27c8c0942b06126",
      "tree": "832ecb4da5fd27efa5a503df5b96bfdee2a52ffd",
      "parents": [
        "ee64fc9354e515a79c7232cfde65c88ec627308b"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:56 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: vmscan: reclaim order-0 and use compaction instead of lumpy reclaim\n\nLumpy reclaim is disruptive.  It reclaims a large number of pages and\nignores the age of the pages it reclaims.  This can incur significant\nstalls and potentially increase the number of major faults.\n\nCompaction has reached the point where it is considered reasonably stable\n(meaning it has passed a lot of testing) and is a potential candidate for\ndisplacing lumpy reclaim.  This patch introduces an alternative to lumpy\nreclaim whe compaction is available called reclaim/compaction.  The basic\noperation is very simple - instead of selecting a contiguous range of\npages to reclaim, a number of order-0 pages are reclaimed and then\ncompaction is later by either kswapd (compact_zone_order()) or direct\ncompaction (__alloc_pages_direct_compact()).\n\n[akpm@linux-foundation.org: fix build]\n[akpm@linux-foundation.org: use conventional task_struct naming]\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nAcked-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ee64fc9354e515a79c7232cfde65c88ec627308b",
      "tree": "fb5fb6c0045ff5467ed5870d5f64806784deba2d",
      "parents": [
        "b7aba6984dc048503b69c2a885098cdd430832bf"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:55 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: vmscan: convert lumpy_mode into a bitmask\n\nCurrently lumpy_mode is an enum and determines if lumpy reclaim is off,\nsyncronous or asyncronous.  In preparation for using compaction instead of\nlumpy reclaim, this patch converts the flags into a bitmap.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b7aba6984dc048503b69c2a885098cdd430832bf",
      "tree": "1f682189bd967feaf28c2978445c7ebe82116185",
      "parents": [
        "2d90508f638241a2e7422d884767398296ebe720"
      ],
      "author": {
        "name": "Mel Gorman",
        "email": "mel@csn.ul.ie",
        "time": "Thu Jan 13 15:45:54 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: compaction: add trace events for memory compaction activity\n\nIn preparation for a patches promoting the use of memory compaction over\nlumpy reclaim, this patch adds trace points for memory compaction\nactivity.  Using them, we can monitor the scanning activity of the\nmigration and free page scanners as well as the number and success rates\nof pages passed to page migration.\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Andy Whitcroft \u003capw@shadowen.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2d90508f638241a2e7422d884767398296ebe720",
      "tree": "5b80c4919d924ab76c02b629465cbc7820010a53",
      "parents": [
        "62c70bce8ac236514c610020bb1ae5b8bde965cb"
      ],
      "author": {
        "name": "Nikanth Karthikesan",
        "email": "knikanth@suse.de",
        "time": "Thu Jan 13 15:45:53 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: smaps: export mlock information\n\nCurrently there is no way to find whether a process has locked its pages\nin memory or not.  And which of the memory regions are locked in memory.\n\nAdd a new field \"Locked\" to export this information via the smaps file.\n\nSigned-off-by: Nikanth Karthikesan \u003cknikanth@suse.de\u003e\nAcked-by: Balbir Singh \u003cbalbir@linux.vnet.ibm.com\u003e\nAcked-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Matt Mackall \u003cmpm@selenic.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "62c70bce8ac236514c610020bb1ae5b8bde965cb",
      "tree": "24f13ae48325034f9a8c4385669adcef545b4836",
      "parents": [
        "c32b0d4b3f19c2f5d29568f8b7b72b61693f1277"
      ],
      "author": {
        "name": "Joe Perches",
        "email": "joe@perches.com",
        "time": "Thu Jan 13 15:45:52 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:33 2011 -0800"
      },
      "message": "mm: convert sprintf_symbol to %pS\n\nSigned-off-by: Joe Perches \u003cjoe@perches.com\u003e\nAcked-by: Pekka Enberg \u003cpenberg@kernel.org\u003e\nCc: Jiri Kosina \u003ctrivial@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": "c32b0d4b3f19c2f5d29568f8b7b72b61693f1277",
      "tree": "9cbaad32db3e63396620d60d56c7895d236b8944",
      "parents": [
        "9cbb4cb21b19fff46cf1174d0ed699ef710e641c"
      ],
      "author": {
        "name": "Hai Shan",
        "email": "haishan.bai@gmail.com",
        "time": "Thu Jan 13 15:45:51 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "fs/mpage.c: consolidate code\n\nMerge mpage_end_io_read() and mpage_end_io_write() into mpage_end_io() to\neliminate code duplication.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Hai Shan \u003cshan.hai@windriver.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9cbb4cb21b19fff46cf1174d0ed699ef710e641c",
      "tree": "56480b1f4082d6158f077378db36c99d6d3ff209",
      "parents": [
        "f0bc0a60b13f209df16062f94e9fb4b90dc08708"
      ],
      "author": {
        "name": "Nick Piggin",
        "email": "npiggin@kernel.dk",
        "time": "Thu Jan 13 15:45:51 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "mm: find_get_pages_contig fixlet\n\nTesting -\u003emapping and -\u003eindex without a ref is not stable as the page\nmay have been reused at this point.\n\nSigned-off-by: Nick Piggin \u003cnpiggin@kernel.dk\u003e\nReviewed-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nReviewed-by: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f0bc0a60b13f209df16062f94e9fb4b90dc08708",
      "tree": "c876603d2cb17a3e2ed159ca5e08e4665cc09fe2",
      "parents": [
        "c3f0da631539b3b8e17f6dda567af9958d49d14f"
      ],
      "author": {
        "name": "KOSAKI Motohiro",
        "email": "kosaki.motohiro@jp.fujitsu.com",
        "time": "Thu Jan 13 15:45:50 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "vmscan: factor out kswapd sleeping logic from kswapd()\n\nCurrently, kswapd() has deep nesting and is slightly hard to read.  Clean\nthis up.\n\nSigned-off-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.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": "c3f0da631539b3b8e17f6dda567af9958d49d14f",
      "tree": "b9bc0060ac0fa99d0dc9e6caadb0abf0172249ef",
      "parents": [
        "c691b9d983d7015d54057034f4cd9b6d8affd976"
      ],
      "author": {
        "name": "Bob Liu",
        "email": "lliubbo@gmail.com",
        "time": "Thu Jan 13 15:45:49 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "mm/page-writeback.c: fix __set_page_dirty_no_writeback() return value\n\n__set_page_dirty_no_writeback() should return true if it actually\ntransitioned the page from a clean to dirty state although it seems nobody\nuses its return value at present.\n\nSigned-off-by: Bob Liu \u003clliubbo@gmail.com\u003e\nAcked-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c691b9d983d7015d54057034f4cd9b6d8affd976",
      "tree": "f87bd8ba07deacb2bcab5fe93684a04f0f7d34c2",
      "parents": [
        "b9543dac5bbc4aef0a598965b6b34f6259ab9a9b"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Thu Jan 13 15:45:48 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "sync_inode_metadata: fix comment\n\nUse correct function name, remove incorrect apostrophe\n\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b9543dac5bbc4aef0a598965b6b34f6259ab9a9b",
      "tree": "255244e6bb9340d4b8ce1fa6b4d2ed4adece4b15",
      "parents": [
        "aa373cf550994623efb5d49a4d8775bafd10bbc1"
      ],
      "author": {
        "name": "Jan Kara",
        "email": "jack@suse.cz",
        "time": "Thu Jan 13 15:45:48 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "writeback: avoid livelocking WB_SYNC_ALL writeback\n\nWhen wb_writeback() is called in WB_SYNC_ALL mode, work-\u003enr_to_write is\nusually set to LONG_MAX.  The logic in wb_writeback() then calls\n__writeback_inodes_sb() with nr_to_write \u003d\u003d MAX_WRITEBACK_PAGES and we\neasily end up with non-positive nr_to_write after the function returns, if\nthe inode has more than MAX_WRITEBACK_PAGES dirty pages at the moment.\n\nWhen nr_to_write is \u003c\u003d 0 wb_writeback() decides we need another round of\nwriteback but this is wrong in some cases!  For example when a single\nlarge file is continuously dirtied, we would never finish syncing it\nbecause each pass would be able to write MAX_WRITEBACK_PAGES and inode\ndirty timestamp never gets updated (as inode is never completely clean).\nThus __writeback_inodes_sb() would write the redirtied inode again and\nagain.\n\nFix the issue by setting nr_to_write to LONG_MAX in WB_SYNC_ALL mode.  We\ndo not need nr_to_write in WB_SYNC_ALL mode anyway since\nwrite_cache_pages() does livelock avoidance using page tagging in\nWB_SYNC_ALL mode.\n\nThis makes wb_writeback() call __writeback_inodes_sb() only once on\nWB_SYNC_ALL.  The latter function won\u0027t livelock because it works on\n\n- a finite set of files by doing queue_io() once at the beginning\n- a finite set of pages by PAGECACHE_TAG_TOWRITE page tagging\n\nAfter this patch, program from http://lkml.org/lkml/2010/10/24/154 is no\nlonger able to stall sync forever.\n\n[fengguang.wu@intel.com: fix locking comment]\nSigned-off-by: Jan Kara \u003cjack@suse.cz\u003e\nSigned-off-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nCc: Jan Engelhardt \u003cjengelh@medozas.de\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "aa373cf550994623efb5d49a4d8775bafd10bbc1",
      "tree": "64b14d1f5491f436a8b3ea5c32edecde5c255285",
      "parents": [
        "71927e84e0aebfbe5a91565c3b207af25a4e9162"
      ],
      "author": {
        "name": "Jan Kara",
        "email": "jack@suse.cz",
        "time": "Thu Jan 13 15:45:47 2011 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jan 13 17:32:32 2011 -0800"
      },
      "message": "writeback: stop background/kupdate works from livelocking other works\n\nBackground writeback is easily livelockable in a loop in wb_writeback() by\na process continuously re-dirtying pages (or continuously appending to a\nfile).  This is in fact intended as the target of background writeback is\nto write dirty pages it can find as long as we are over\ndirty_background_threshold.\n\nBut the above behavior gets inconvenient at times because no other work\nqueued in the flusher thread\u0027s queue gets processed.  In particular, since\ne.g.  sync(1) relies on flusher thread to do all the IO for it, sync(1)\ncan hang forever waiting for flusher thread to do the work.\n\nGenerally, when a flusher thread has some work queued, someone submitted\nthe work to achieve a goal more specific than what background writeback\ndoes.  Moreover by working on the specific work, we also reduce amount of\ndirty pages which is exactly the target of background writeout.  So it\nmakes sense to give specific work a priority over a generic page cleaning.\n\nThus we interrupt background writeback if there is some other work to do.\nWe return to the background writeback after completing all the queued\nwork.\n\nThis may delay the writeback of expired inodes for a while, however the\nexpired inodes will eventually be flushed to disk as long as the other\nworks won\u0027t livelock.\n\n[fengguang.wu@intel.com: update comment]\nSigned-off-by: Jan Kara \u003cjack@suse.cz\u003e\nSigned-off-by: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nCc: Jan Engelhardt \u003cjengelh@medozas.de\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\n\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ],
  "next": "71927e84e0aebfbe5a91565c3b207af25a4e9162"
}
