]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: show additional caches (s390)
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 22 Jun 2016 07:25:59 +0000 (09:25 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 24 Jun 2016 08:54:09 +0000 (10:54 +0200)
commit28b1658f8b5b3c9fdd971201de6e95abb33526a9
tree95d9395d639917f7dba7fdfeee84bde905d5afce
parent0c28f0c8151a8ac41e12b672643a5beda82f09b4
lscpu: show additional caches (s390)

The Linux kernel exposes the cache topology via sysfs. However on
virtualized machines like s390 the cache topology contains only cpu
private caches.

For shared caches it is not known which cpus share them. The
hypervisor would have to update this information whenever a virtual
cpu would be scheduled on a different physical cpu and make the guest
aware of that change. Given that there is hardly any benefit, if it
all, this isn't done.

However it is still of interest to know about the non-private
caches. Therefore this information is available via /proc/cpuinfo at
least on s390.

This patch adds additional lines to the summary output for all shared
caches for which information can be found in /proc/cpuinfo, since we
know these aren't exposed via sysfs.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
sys-utils/lscpu.c
tests/expected/lscpu/lscpu-s390-lpar-drawer