• Hugh Dickins's avatar
    [PATCH] rmaplock: swapoff use anon_vma · 69929041
    Hugh Dickins authored
    Swapoff can make good use of a page's anon_vma and index, while it's still
    left in swapcache, or once it's brought back in and the first pte mapped back:
    unuse_vma go directly to just one page of only those vmas with the same
    anon_vma.  And unuse_process can skip any vmas without an anon_vma (extending
    the hugetlb check: hugetlb vmas have no anon_vma).
    
    This just hacks in on top of the existing procedure, still going through all
    the vmas of all the mms in mmlist.  A more elegant procedure might replace
    mmlist by a list of anon_vmas: but that would be more work to implement, with
    apparently more overhead in the common paths.
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    69929041
swapfile.c 42 KB