• Heiko Carstens's avatar
    s390/pgtable: add mapping statistics · 37cd944c
    Heiko Carstens authored
    Add statistics that show how memory is mapped within the kernel
    identity mapping. This is more or less the same like git
    commit ce0c0e50 ("x86, generic: CPA add statistics about state
    of direct mapping v4") for x86.
    
    I also intentionally copied the lower case "k" within DirectMap4k vs
    the upper case "M" and "G" within the two other lines. Let's have
    consistent inconsistencies across architectures.
    
    The output of /proc/meminfo now contains these additional lines:
    
    DirectMap4k:        2048 kB
    DirectMap1M:     3991552 kB
    DirectMap2G:     4194304 kB
    
    The implementation on s390 is lockless unlike the x86 version, since I
    assume changes to the kernel mapping are a very rare event. Therefore
    it really doesn't matter if these statistics could potentially be
    inconsistent if read while kernel pages tables are being changed.
    Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Acked-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    37cd944c
vmem.c 9.02 KB