• Cyrill Gorcunov's avatar
    pagemap-cache: Introduce engine · 21e510dd
    Cyrill Gorcunov authored
    Pavel reported that in case if there a big number
    of small vmas present in the dumpee we're reading
    /proc/pid/pagemap too frequently.
    
    To speedup this procedue we inroduce pagemap cache.
    
    The interface is:
     - pmc_init/pmc_fini for cache initialization and freeing
     - pmc_get_map to retrieve specific PMEs array for VMA area
    
    v2:
     - Move internal constants to pagemap-cache.c
     - Make PAGEMAP_LEN to accept virtual address/size
     - Don't adjust low bound in caching mode to save a couple of code bytes
    Reported-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    21e510dd
pagemap-cache.h 826 Bytes