• Naoya Horiguchi's avatar
    mm hugetlb: add hugepage support to pagemap · 5dc37642
    Naoya Horiguchi authored
    This patch enables extraction of the pfn of a hugepage from
    /proc/pid/pagemap in an architecture independent manner.
    
    Details
    -------
    My test program (leak_pagemap) works as follows:
     - creat() and mmap() a file on hugetlbfs (file size is 200MB == 100 hugepages,)
     - read()/write() something on it,
     - call page-types with option -p,
     - munmap() and unlink() the file on hugetlbfs
    
    Without my patches
    ------------------
    $ ./leak_pagemap
                 flags page-count       MB  symbolic-flags                     long-symbolic-flags
    0x0000000000000000          1        0  __________________________________
    0x0000000000000804          1        0  __R________M______________________ referenced,mmap
    0x000000000000086c         81        0  __RU_lA____M______________________ referenced,uptodate,lru,active,mmap
    0x0000000000005808          5        0  ___U_______Ma_b___________________ uptodate,mmap,anonymous,swapbacked
    0x0000000000005868         12        0  ___U_lA____Ma_b__...
    5dc37642
pagewalk.c 3.95 KB