linux/arch/s390
Heiko Carstens 881730ad36 s390/cache: expose cpu cache topology via sysfs
Expose cpu cache topology via sysfs.
The created sysfs directory structure is compatible to what x86, ia64
and powerpc have.
On s390 we expose only information about cpu caches which are private
to a cpu via sysfs . Caches which are shared between cpus do not have
a sysfs representation.
The reason for that is that the file "shared_cpu_map" is mandatory
and only if running under LPAR it is possible to tell which cpus
share which cache. Second level hypervisors however do not and cannot
expose that information to guests.
In order to have a consistent view we made the choice to always only
expose information about private cpu caches via sysfs.

Example for a z196 cpu (cpu1 in /sys/devices/cpu):

cpu1/cache/index0/size -- 64K
cpu1/cache/index0/type -- Data
cpu1/cache/index0/level -- 1
cpu1/cache/index0/number_of_sets -- 64
cpu1/cache/index0/shared_cpu_map -- 00000000,00000002
cpu1/cache/index0/shared_cpu_list -- 1
cpu1/cache/index0/coherency_line_size -- 256
cpu1/cache/index0/ways_of_associativity -- 4
cpu1/cache/index1/size -- 128K
cpu1/cache/index1/type -- Instruction
cpu1/cache/index1/level -- 1
cpu1/cache/index1/number_of_sets -- 64
cpu1/cache/index1/shared_cpu_map -- 00000000,00000002
cpu1/cache/index1/shared_cpu_list -- 1
cpu1/cache/index1/coherency_line_size -- 256
cpu1/cache/index1/ways_of_associativity -- 8
cpu1/cache/index2/size -- 1536K
cpu1/cache/index2/type -- Unified
cpu1/cache/index2/level -- 2
cpu1/cache/index2/number_of_sets -- 512
cpu1/cache/index2/shared_cpu_map -- 00000000,00000002
cpu1/cache/index2/shared_cpu_list -- 1
cpu1/cache/index2/coherency_line_size -- 256
cpu1/cache/index2/ways_of_associativity -- 12

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-09-26 15:44:51 +02:00
..
appldata s390/vtimer: rework virtual timer interface 2012-07-20 11:15:08 +02:00
boot s390/string: provide asm lib functions for memcpy and memcmp 2012-09-26 15:44:50 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-07-26 13:00:59 -07:00
hypfs s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
include/asm s390/string: provide asm lib functions for memcpy and memcmp 2012-09-26 15:44:50 +02:00
kernel s390/cache: expose cpu cache topology via sysfs 2012-09-26 15:44:51 +02:00
kvm KVM updates for the 3.6 merge window 2012-07-24 12:01:20 -07:00
lib s390/string: provide asm lib functions for memcpy and memcmp 2012-09-26 15:44:50 +02:00
math-emu s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
mm s390: enable large page support with CONFIG_DEBUG_PAGEALLOC 2012-09-26 15:44:50 +02:00
net s390/bpf,jit: improve code generation 2012-09-26 15:44:49 +02:00
oprofile oprofile, s390: Fix uninitialized memory access when writing to oprofilefs 2012-08-27 14:49:23 +02:00
defconfig Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-31 19:25:39 -07:00
Kbuild s390/bpf,jit: BPF Just In Time compiler for s390 2012-09-26 15:44:49 +02:00
Kconfig s390/bpf,jit: BPF Just In Time compiler for s390 2012-09-26 15:44:49 +02:00
Kconfig.debug [S390] Write protect module text and RO data 2011-03-15 17:08:23 +01:00
Makefile s390: Use generic init_task 2012-05-05 13:00:25 +02:00