• Hugh Dickins's avatar
    The pages_shared and pages_sharing counts give a good picture of how · 7867ac02
    Hugh Dickins authored
    successful KSM is at sharing; but no clue to how much wasted work it's
    doing to get there.  Add pages_unshared (count of unique pages waiting
    in the unstable tree, hoping to find a mate) and pages_volatile.
    
    pages_volatile is harder to define.  It includes those pages changing
    too fast to get into the unstable tree, but also whatever other edge
    conditions prevent a page getting into the trees: a high value may
    deserve investigation.  Don't try to calculate it from the various
    conditions: it's the total of rmap_items less those accounted for.
    
    Also show full_scans: the number of completed scans of everything
    registered in the mm list.
    
    The locking for all these counts is simply ksm_thread_mutex.
    Signed-off-by: default avatarHugh Dickins <hugh.dickins@tiscali.co.uk>
    Acked-by: default avatarIzik Eidus <ieidus@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    7867ac02
ksm.c 41.3 KB