• Gautham R. Shenoy's avatar
    powerpc/cacheinfo: Report the correct shared_cpu_map on big-cores · 500fe5f5
    Gautham R. Shenoy authored
    Currently on POWER9 SMT8 cores systems, in sysfs, we report the
    shared_cache_map for L1 caches (both data and instruction) to be the
    cpu-ids of the threads in SMT8 cores. This is incorrect since on
    POWER9 SMT8 cores there are two groups of threads, each of which
    shares its own L1 cache.
    
    This patch addresses this by reporting the shared_cpu_map correctly in
    sysfs for L1 caches.
    
    Before the patch
       /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map : 000000ff
       /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map : 000000ff
       /sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map : 000000ff
       /sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map : 000000ff
    
    After the patch
       /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map : 00000055
       /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map : 00000055
       /sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map : 000000aa
       /sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map : 000000aa
    Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    500fe5f5
cacheinfo.c 21.7 KB