)]}'
{
  "log": [
    {
      "commit": "4969c1192d15afa3389e7ae3302096ff684ba655",
      "tree": "abe560c8f293191be65488c49f4db3f3a626e63c",
      "parents": [
        "7c5367f205f7d53659fb19b9fdf65b7bc1a592c6"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Thu Sep 09 16:37:52 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Sep 09 18:57:24 2010 -0700"
      },
      "message": "mm: fix swapin race condition\n\nThe pte_same check is reliable only if the swap entry remains pinned (by\nthe page lock on swapcache).  We\u0027ve also to ensure the swapcache isn\u0027t\nremoved before we take the lock as try_to_free_swap won\u0027t care about the\npage pin.\n\nOne of the possible impacts of this patch is that a KSM-shared page can\npoint to the anon_vma of another process, which could exit before the page\nis freed.\n\nThis can leave a page with a pointer to a recycled anon_vma object, or\nworse, a pointer to something that is no longer an anon_vma.\n\n[riel@redhat.com: changelog help]\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Hugh Dickins \u003chughd@google.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ba6f0ff3981e6263ab81ac512f04cca55b85ec81",
      "tree": "0052d4551de72731be503c8d78949a330ba865ed",
      "parents": [
        "26ba0cb63cb8df4e45394227f33c938920b11b88"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Mon Aug 09 17:19:08 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Aug 09 20:44:58 2010 -0700"
      },
      "message": "ksm: fix ksm swapin time optimization\n\nThe new anon-vma code, was suboptimal and it lead to erratic invocation of\nksm_does_need_to_copy.  That leads to host hangs or guest vnc lockup, or\nweird behavior.  It\u0027s unclear why ksm_does_need_to_copy is unstable but\nthe point is that when KSM is not in use, ksm_does_need_to_copy must never\nrun or we bounce pages for no good reason.  I suspect the same hangs will\nhappen with KVM swaps.  But this at least fixes the regression in the\nnew-anon-vma code and it only let KSM bugs triggers when KSM is in use.\n\nThe code in do_swap_page likely doesn\u0027t cope well with a not-swapcache,\nespecially the memcg code.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Izik Eidus \u003cieidus@yahoo.com\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f42647acc4eab1befa9e290691ed7a40f9a7d3cc",
      "tree": "b2ced9ee524f8db99ca2ed64d181e0860a60ff94",
      "parents": [
        "8bea8672edfca7ec5f661cafb218f1205863b343"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Wed Dec 16 08:56:57 2009 +0000"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Dec 16 06:56:12 2009 -0800"
      },
      "message": "fix ksm.h breakage of nommu build\n\nCommit 5ad6468801d28c4d4ac9f48ec19297817c915f6a \"ksm: let shared pages\nbe swappable\" breaks the build on m68knommu and I suspect on any nommu:\n\n  In file included from kernel/fork.c:52:\n  include/linux/ksm.h:129: warning: \u0027enum ttu_flags\u0027 declared inside parameter list\n  include/linux/ksm.h:129: warning: its scope is only this definition or declaration, which is probably not what you want\n  include/linux/ksm.h:129: error: parameter 2 (\u0027flags\u0027) has incomplete type\n  make[1]: *** [kernel/fork.o] Error 1\n  make[1]: *** Waiting for unfinished jobs....\n\nLet\u0027s fix that with CONFIG_MMU around most of the !CONFIG_KSM declarations.\n\nReported-by: Steven King \u003csfking@fdwdc.com\u003e\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nTested-by: Steven King \u003csfking@fdwdc.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e9995ef978a7d5296fe04a9a2c5ca6e66d8bb4e5",
      "tree": "df4324273856e06b8277b7e4a0fa9289eb8e6385",
      "parents": [
        "407f9c8b0889ced1dbe2f9157e4e60c61329d5c9"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Dec 14 17:59:31 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 15 08:53:20 2009 -0800"
      },
      "message": "ksm: rmap_walk to remove_migation_ptes\n\nA side-effect of making ksm pages swappable is that they have to be placed\non the LRUs: which then exposes them to isolate_lru_page() and hence to\npage migration.\n\nAdd rmap_walk() for remove_migration_ptes() to use: rmap_walk_anon() and\nrmap_walk_file() in rmap.c, but rmap_walk_ksm() in ksm.c.  Perhaps some\nconsolidation with existing code is possible, but don\u0027t attempt that yet\n(try_to_unmap needs to handle nonlinears, but migration pte removal does\nnot).\n\nrmap_walk() is sadly less general than it appears: rmap_walk_anon(), like\nremove_anon_migration_ptes() which it replaces, avoids calling\npage_lock_anon_vma(), because that includes a page_mapped() test which\nfails when all migration ptes are in place.  That was valid when NUMA page\nmigration was introduced (holding mmap_sem provided the missing guarantee\nthat anon_vma\u0027s slab had not already been destroyed), but I believe not\nvalid in the memory hotremove case added since.\n\nFor now do the same as before, and consider the best way to fix that\nunlikely race later on.  When fixed, we can probably use rmap_walk() on\nhwpoisoned ksm pages too: for now, they remain among hwpoison\u0027s various\nexceptions (its PageKsm test comes before the page is locked, but its\npage_lock_anon_vma fails safely if an anon gets upgraded).\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Chris Wright \u003cchrisw@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": "5ad6468801d28c4d4ac9f48ec19297817c915f6a",
      "tree": "edd8dc48693f43278d6fe1614aca2bf660d4dc10",
      "parents": [
        "73848b4684e84a84cfd1555af78d41158f31e16b"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Dec 14 17:59:24 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 15 08:53:19 2009 -0800"
      },
      "message": "ksm: let shared pages be swappable\n\nInitial implementation for swapping out KSM\u0027s shared pages: add\npage_referenced_ksm() and try_to_unmap_ksm(), which rmap.c calls when\nfaced with a PageKsm page.\n\nMost of what\u0027s needed can be got from the rmap_items listed from the\nstable_node of the ksm page, without discovering the actual vma: so in\nthis patch just fake up a struct vma for page_referenced_one() or\ntry_to_unmap_one(), then refine that in the next patch.\n\nAdd VM_NONLINEAR to ksm_madvise()\u0027s list of exclusions: it has always been\nimplicit there (being only set with VM_SHARED, already excluded), but\nlet\u0027s make it explicit, to help justify the lack of nonlinear unmap.\n\nRely on the page lock to protect against concurrent modifications to that\npage\u0027s node of the stable tree.\n\nThe awkward part is not swapout but swapin: do_swap_page() and\npage_add_anon_rmap() now have to allow for new possibilities - perhaps a\nksm page still in swapcache, perhaps a swapcache page associated with one\nlocation in one anon_vma now needed for another location or anon_vma.\n(And the vma might even be no longer VM_MERGEABLE when that happens.)\n\nksm_might_need_to_copy() checks for that case, and supplies a duplicate\npage when necessary, simply leaving it to a subsequent pass of ksmd to\nrediscover the identity and merge them back into one ksm page.\nDisappointingly primitive: but the alternative would have to accumulate\nunswappable info about the swapped out ksm pages, limiting swappability.\n\nRemove page_add_ksm_rmap(): page_add_anon_rmap() now has to allow for the\nparticular case it was handling, so just use it instead.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Chris Wright \u003cchrisw@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": "08beca44dfb0ab008e365163df70dbd302ae1508",
      "tree": "33f3ddf5460e139bd7fd37e8c08026a7d852c3da",
      "parents": [
        "7b6ba2c7d3baf8cd9f888e05563dcc32e368baab"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Dec 14 17:59:21 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 15 08:53:19 2009 -0800"
      },
      "message": "ksm: stable_node point to page and back\n\nAdd a pointer to the ksm page into struct stable_node, holding a reference\nto the page while the node exists.  Put a pointer to the stable_node into\nthe ksm page\u0027s -\u003emapping.\n\nThen we don\u0027t need get_ksm_page() while traversing the stable tree: the\npage to compare against is sure to be present and correct, even if it\u0027s no\nlonger visible through any of its existing rmap_items.\n\nAnd we can handle the forked ksm page case more efficiently: no need to\nmemcmp our way through the tree to find its match.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "3ca7b3c5b64d35fe02c35b5d44c2c58b49499fee",
      "tree": "bb6af24d3683788ef658282f8794af19d2232663",
      "parents": [
        "bb3ab596832b920c703d1aea1ce76d69c0f71fb7"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Dec 14 17:58:57 2009 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Dec 15 08:53:17 2009 -0800"
      },
      "message": "mm: define PAGE_MAPPING_FLAGS\n\nAt present we define PageAnon(page) by the low PAGE_MAPPING_ANON bit set\nin page-\u003emapping, with the higher bits a pointer to the anon_vma; and have\ndefined PageKsm(page) as that with NULL anon_vma.\n\nBut KSM swapping will need to store a pointer there: so in preparation for\nthat, now define PAGE_MAPPING_FLAGS as the low two bits, including\nPAGE_MAPPING_KSM (always set along with PAGE_MAPPING_ANON, until some\nother use for the bit emerges).\n\nDeclare page_rmapping(page) to return the pointer part of page-\u003emapping,\nand page_anon_vma(page) to return the anon_vma pointer when that\u0027s what it\nis.  Use these in a few appropriate places: notably, unuse_vma() has been\ntesting page-\u003emapping, but is better to be testing page_anon_vma() (cases\nmay be added in which flag bits are set without any pointer).\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Nick Piggin \u003cnpiggin@suse.de\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nCc: Lee Schermerhorn \u003cLee.Schermerhorn@hp.com\u003e\nCc: Andi Kleen \u003candi@firstfloor.org\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Minchan Kim \u003cminchan.kim@gmail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "a913e182ab9484308e870af37a14d372742d53b0",
      "tree": "0fca5598aeba4c53999ec46b6b82b46f9a981965",
      "parents": [
        "8314c4f24a0a5c9b1f7544e9fa83a1d5367ddaa7"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Sep 21 17:02:26 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:33 2009 -0700"
      },
      "message": "ksm: clean up obsolete references\n\nA few cleanups, given the munlock fix: the comment on ksm_test_exit() no\nlonger applies, and it can be made private to ksm.c; there\u0027s no more\nreference to mmu_gather or tlb.h, and mmap.c doesn\u0027t need ksm.h.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nAcked-by: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1c2fb7a4c2ca7a958b02bc1e615d0254990bba8d",
      "tree": "489a97bd453b8002f2234f7e736548103315fa38",
      "parents": [
        "9ba6929480088a85c1ff60a4b1f1c9fc80dbd2b7"
      ],
      "author": {
        "name": "Andrea Arcangeli",
        "email": "aarcange@redhat.com",
        "time": "Mon Sep 21 17:02:22 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:32 2009 -0700"
      },
      "message": "ksm: fix deadlock with munlock in exit_mmap\n\nRawhide users have reported hang at startup when cryptsetup is run: the\nsame problem can be simply reproduced by running a program int main() {\nmlockall(MCL_CURRENT | MCL_FUTURE); return 0; }\n\nThe problem is that exit_mmap() applies munlock_vma_pages_all() to\nclean up VM_LOCKED areas, and its current implementation (stupidly)\ntries to fault in absent pages, for example where PROT_NONE prevented\nthem being faulted in when mlocking.  Whereas the \"ksm: fix oom\ndeadlock\" patch, knowing there\u0027s a race by which KSM might try to fault\nin pages after exit_mmap() had finally zapped the range, backs out of\nsuch faults doing nothing when its ksm_test_exit() notices mm_users 0.\n\nSo revert that part of \"ksm: fix oom deadlock\" which moved the\nksm_exit() call from before exit_mmap() to the middle of exit_mmap();\nand remove those ksm_test_exit() checks from the page fault paths, so\nallowing the munlocking to proceed without interference.\n\nksm_exit, if there are rmap_items still chained on this mm slot, takes\nmmap_sem write side: so preventing KSM from working on an mm while\nexit_mmap runs.  And KSM will bail out as soon as it notices that\nmm_users is already zero, thanks to its internal ksm_test_exit checks.\nSo that when a task is killed by OOM killer or the user, KSM will not\nindefinitely prevent it from running exit_mmap to release its memory.\n\nThis does break a part of what \"ksm: fix oom deadlock\" was trying to\nachieve.  When unmerging KSM (echo 2 \u003e/sys/kernel/mm/ksm), and even\nwhen ksmd itself has to cancel a KSM page, it is possible that the\nfirst OOM-kill victim would be the KSM process being faulted: then its\nmemory won\u0027t be freed until a second victim has been selected (freeing\nmemory for the unmerging fault to complete).\n\nBut the OOM killer is already liable to kill a second victim once the\nintended victim\u0027s p-\u003emm goes to NULL: so there\u0027s not much point in\nrejecting this KSM patch before fixing that OOM behaviour.  It is very\nmuch more important to allow KSM users to boot up, than to haggle over\nan unlikely and poorly supported OOM case.\n\nWe also intend to fix munlocking to not fault pages: at which point\nthis patch _could_ be reverted; though that would be controversial, so\nwe hope to find a better solution.\n\nSigned-off-by: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nAcked-by: Justin M. Forbes \u003cjforbes@redhat.com\u003e\nAcked-for-now-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: Izik Eidus \u003cieidus@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": "9ba6929480088a85c1ff60a4b1f1c9fc80dbd2b7",
      "tree": "39aab8cdffae598b55e35c578f70820712286ab4",
      "parents": [
        "cd551f97519d35855be5a8720a47cc802ee4fd06"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Sep 21 17:02:20 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:32 2009 -0700"
      },
      "message": "ksm: fix oom deadlock\n\nThere\u0027s a now-obvious deadlock in KSM\u0027s out-of-memory handling:\nimagine ksmd or KSM_RUN_UNMERGE handling, holding ksm_thread_mutex,\ntrying to allocate a page to break KSM in an mm which becomes the\nOOM victim (quite likely in the unmerge case): it\u0027s killed and goes\nto exit, and hangs there waiting to acquire ksm_thread_mutex.\n\nClearly we must not require ksm_thread_mutex in __ksm_exit, simple\nthough that made everything else: perhaps use mmap_sem somehow?\nAnd part of the answer lies in the comments on unmerge_ksm_pages:\n__ksm_exit should also leave all the rmap_item removal to ksmd.\n\nBut there\u0027s a fundamental problem, that KSM relies upon mmap_sem to\nguarantee the consistency of the mm it\u0027s dealing with, yet exit_mmap\ntears down an mm without taking mmap_sem.  And bumping mm_users won\u0027t\nhelp at all, that just ensures that the pages the OOM killer assumes\nare on their way to being freed will not be freed.\n\nThe best answer seems to be, to move the ksm_exit callout from just\nbefore exit_mmap, to the middle of exit_mmap: after the mm\u0027s pages\nhave been freed (if the mmu_gather is flushed), but before its page\ntables and vma structures have been freed; and down_write,up_write\nmmap_sem there to serialize with KSM\u0027s own reliance on mmap_sem.\n\nBut KSM then needs to be careful, whenever it downs mmap_sem, to\ncheck that the mm is not already exiting: there\u0027s a danger of using\nfind_vma on a layout that\u0027s being torn apart, or writing into page\ntables which have been freed for reuse; and even do_anonymous_page\nand __do_fault need to check they\u0027re not being called by break_ksm\nto reinstate a pte after zap_pte_range has zapped that page table.\n\nThough it might be clearer to add an exiting flag, set while holding\nmmap_sem in __ksm_exit, that wouldn\u0027t cover the issue of reinstating\na zapped pte.  All we need is to check whether mm_users is 0 - but\nmust remember that ksmd may detect that before __ksm_exit is reached.\nSo, ksm_test_exit(mm) added to comment such checks on mm-\u003emm_users.\n\n__ksm_exit now has to leave clearing up the rmap_items to ksmd,\nthat needs ksm_thread_mutex; but shift the exiting mm just after the\nksm_scan cursor so that it will soon be dealt with.  __ksm_enter raise\nmm_count to hold the mm_struct, ksmd\u0027s exit processing (exactly like\nits processing when it finds all VM_MERGEABLEs unmapped) mmdrop it,\nsimilar procedure for KSM_RUN_UNMERGE (which has stopped ksmd).\n\nBut also give __ksm_exit a fast path: when there\u0027s no complication\n(no rmap_items attached to mm and it\u0027s not at the ksm_scan cursor),\nit can safely do all the exiting work itself.  This is not just an\noptimization: when ksmd is not running, the raised mm_count would\notherwise leak mm_structs.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nAcked-by: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9a840895147b12de5cdd633c600b38686840ee53",
      "tree": "a266a69a39decb4ec0364ac331f0ab19b6f09f06",
      "parents": [
        "21333b2b66b805a360641568588e5a0bb06d9d1f"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Sep 21 17:02:01 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:31 2009 -0700"
      },
      "message": "ksm: identify PageKsm pages\n\nKSM will need to identify its kernel merged pages unambiguously, and\n/proc/kpageflags will probably like to do so too.\n\nSince KSM will only be substituting anonymous pages, statistics are best\npreserved by making a PageKsm page a special PageAnon page: one with no\nanon_vma.\n\nBut KSM then needs its own page_add_ksm_rmap() - keep it in ksm.h near\nPageKsm; and do_wp_page() must COW them, unlike singly mapped PageAnons.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nSigned-off-by: Chris Wright \u003cchrisw@redhat.com\u003e\nSigned-off-by: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f8af4da3b4c14e7267c4ffb952079af3912c51c5",
      "tree": "17b0cfbd2d3d9abf9008f69e7fee5369cec7afa5",
      "parents": [
        "d19f352484467a5e518639ddff0554669c10ffab"
      ],
      "author": {
        "name": "Hugh Dickins",
        "email": "hugh.dickins@tiscali.co.uk",
        "time": "Mon Sep 21 17:01:57 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Sep 22 07:17:31 2009 -0700"
      },
      "message": "ksm: the mm interface to ksm\n\nThis patch presents the mm interface to a dummy version of ksm.c, for\nbetter scrutiny of that interface: the real ksm.c follows later.\n\nWhen CONFIG_KSM is not set, madvise(2) reject MADV_MERGEABLE and\nMADV_UNMERGEABLE with EINVAL, since that seems more helpful than\npretending that they can be serviced.  But when CONFIG_KSM\u003dy, accept them\neven if KSM is not currently running, and even on areas which KSM will not\ntouch (e.g.  hugetlb or shared file or special driver mappings).\n\nLike other madvices, report ENOMEM despite success if any area in the\nrange is unmapped, and use EAGAIN to report out of memory.\n\nDefine vma flag VM_MERGEABLE to identify an area on which KSM may try\nmerging pages: leave it to ksm_madvise() to decide whether to set it.\nDefine mm flag MMF_VM_MERGEABLE to identify an mm which might contain\nVM_MERGEABLE areas, to minimize callouts when forking or exiting.\n\nBased upon earlier patches by Chris Wright and Izik Eidus.\n\nSigned-off-by: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nSigned-off-by: Chris Wright \u003cchrisw@redhat.com\u003e\nSigned-off-by: Izik Eidus \u003cieidus@redhat.com\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@gmail.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Balbir Singh \u003cbalbir@in.ibm.com\u003e\nCc: Hugh Dickins \u003chugh.dickins@tiscali.co.uk\u003e\nCc: KAMEZAWA Hiroyuki \u003ckamezawa.hiroyu@jp.fujitsu.com\u003e\nCc: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
