[PATCH 0/4] lscpu: Fix socket information on aarch64 machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lscpu may show the wrong number of physical sockets on aarch64 machine
as 'Socket(s)'.

That is because lscpu uses a sysfs entry (cpu/cpuX/topology/core_siblings) to
get the number of sockets. For aarch64, the sysfs entry is set from MPIDR_EL1
register if the machine doesn't have ACPI PPTT. According to ARM Architecture
Reference Manual, the register shows the topology as the affinity, but doesn't
show the physical socket information.

There're such aarch64 machines because ARM SBBR v1.0 and v1.1 don't require 
ACPI PPTT. SBBR v1.2 requires ACPI PPTT.

For the aarch64 machine, probably 'Cluster(s)' is good instead of 'Socket(s)'
according to linux/arch/arm64/kernel/topology.c:store_cpu_topology().

To get the number of sockets on the machine, SMBIOS Processor information (Type04)
is useful for lscpu because the SMBIOS information is a mandatory
feature for the aarch64 machine which is based on ARM SBBR v1.0 and newer.

With these patches, lscpu shows as following on the machine:

  For unprivileged user:
    $ lscpu 
    Architecture:                    aarch64
    ...
    Socket(s):                       -
    Cluster(s):                      4
    ...

  For root:
    # lscpu
    Architecture:                    aarch64
    ...
    Socket(s):                       1
    Cluster(s):                      4

Masayoshi Mizuma (4):
  lscpu: use cluster on aarch64 machine which doesn't have ACPI PPTT
  lscpu-dmi: split to parse dmi table
  lscpu: add helper to get physical sockets
  lscpu: show physical socket on aarch64 without ACPI PPTT

 sys-utils/lscpu-dmi.c | 90 +++++++++++++++++++++++++++++++++----------
 sys-utils/lscpu.1     |  3 ++
 sys-utils/lscpu.c     | 75 ++++++++++++++++++++++++++++++++----
 sys-utils/lscpu.h     |  1 +
 4 files changed, 142 insertions(+), 27 deletions(-)

-- 
2.27.0



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux