[Bug 1873489] Re: lscpu cache information is incorrect with focal on arm 64-bit platform (ThunderX2)

Mauricio Faria de Oliveira mfo at canonical.com
Wed Apr 29 17:32:11 UTC 2020


Hi Taihsiang,

Thanks for reporting this bug.

This is an upstream deliberate change in output format of caches in lscpu.
They introduced the '--caches' option to provide individual/total sizes.

It affects other architectures as well, not just arm64; e.g., amd64.

For example, on my laptop:

Bionic:

$ lscpu | grep cache
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            3072K

Focal:

$ lscpu | grep cache
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        512 KiB
L3 cache:                        3 MiB

On Eoan and later you can use `lscpu --caches` to get all/individual
cache information.

Focal:

$ lscpu --caches
NAME ONE-SIZE ALL-SIZE WAYS TYPE        LEVEL
L1d       32K      64K    8 Data            1
L1i       32K      64K    8 Instruction     1
L2       256K     512K    4 Unified         2
L3         3M       3M   12 Unified         3

$ lscpu --caches=one-size
ONE-SIZE
     32K
     32K
    256K
      3M

For documentation purposes, this is the PR requesting/discussing it [1],
and this is the patch changing it [2].

Since this has been an upstream decision (see PR comments and patch), I
guess it's unlikely they'd change it back (even though it broke the
previous output convention, as that has been mentioned/acknowledged in
the PR.)

This patch has been introduced on 2.34, so Eoan and later have this
format change.

Hope this helps,
Mauricio

[1] https://github.com/karelzak/util-linux/issues/663
[2] https://github.com/karelzak/util-linux/commit/e5f721132ec8b8c933a396d8dcb3efcb67854f13

** Bug watch added: github.com/karelzak/util-linux/issues #663
   https://github.com/karelzak/util-linux/issues/663

** Changed in: util-linux (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1873489

Title:
  lscpu cache information is incorrect with focal on arm 64-bit platform
  (ThunderX2)

Status in util-linux package in Ubuntu:
  Invalid

Bug description:
  Platform: Cavium Sabre Marvell ThunderX2

  The L1/L2/L3 cache output by "lscpu" is incorrect, and differes from
  the output with bionic.

  [Steps to Reproduce]
  1. Install ubuntu server (focal) on Sabre
  2. lspci

  [Expected Result]
  L1d cache:           32K
  L1i cache:           32K
  L2 cache:            256K
  L3 cache:            32768K

  [Actual Result]
  L1d cache:                       1.8 MiB                                                                              
  L1i cache:                       1.8 MiB                                                                              
  L2 cache:                        14 MiB                                                                               
  L3 cache:                        64 MiB    

  
  [More Information]
  1. eoan could reproduce this issue.
  2. bionic-hwe could not reproduce this issue (5.3.0-46-generic #38~18.04.1-Ubuntu)
  3. with focal, check the cpu cache directly from the virtual devices and the cache information looks good:
      $ cat /sys/devices/system/cpu/cpu0/cache/index0/level /sys/devices/system/cpu/cpu0/cache/index0/size
      1
      32K
  4. More information about the system which could reproduce the issue:

  
      ubuntu at apollo:~$ cat /sys/devices/system/cpu/cpu0/cache/index0/level /sys/devices/system/cpu/cpu0/cache/index0/size
      1
      32K
      ubuntu at apollo:~$ uname -a
      Linux apollo 5.4.0-24-generic #28-Ubuntu SMP Thu Apr 9 22:17:51 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
      ubuntu at apollo:~$ lsb_release -a
      No LSB modules are available.
      Distributor ID: Ubuntu
      Description:    Ubuntu Focal Fossa (development branch)
      Release:        20.04
      Codename:       focal
      ubuntu at apollo:~$ dpkg -l util-linux
      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name           Version         Architecture Description
      +++-==============-===============-============-=================================
      ii  util-linux     2.34-0.1ubuntu9 arm64        miscellaneous system utilities
      ubuntu at apollo:~$

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: util-linux 2.34-0.1ubuntu9
  ProcVersionSignature: User Name 5.4.0-24.28-generic 5.4.30
  Uname: Linux 5.4.0-24-generic aarch64
  ApportVersion: 2.20.11-0ubuntu26
  Architecture: arm64
  CasperMD5CheckResult: skip
  Date: Fri Apr 17 16:00:13 2020
  SourcePackage: util-linux
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1873489/+subscriptions



More information about the foundations-bugs mailing list