• Hugh Dickins's avatar
    ksm: reorganize ksm_check_stable_tree · ee0ea59c
    Hugh Dickins authored
    Memory hotremove's ksm_check_stable_tree() is pitifully inefficient
    (restarting whenever it finds a stale node to remove), but rearrange so
    that at least it does not needlessly restart from nid 0 each time.  And
    add a couple of comments: here is why we keep pfn instead of page.
    Signed-off-by: default avatarHugh Dickins <hughd@google.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Petr Holasek <pholasek@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Izik Eidus <izik.eidus@ravellosystems.com>
    Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
    Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    ee0ea59c
ksm.c 57.6 KB