• Andrew Morton's avatar
    [PATCH] swapoff: activate pages · dd254918
    Andrew Morton authored
    People like to use swapoff/swapon as a way of restoring their VM to a
    predictable "preconditional" state.
    
    Problem is, swapoff leaves mapped anon/pagecache pages on the inactive list,
    so they immediately get swapped out again when swapspace becomes available.
    
    Let's move these pages onto the active list to the VM has to again decide
    whether to swap them out.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    dd254918
swapfile.c 41.4 KB