Unable to retrieve cache information using standard commands (lscpu, cat /proc/cpuinfo, etc.) on Raspberry Pi; seeking assistance to diagnose and resolve the issue

Asked by Iftach Shalev

I'm encountering difficulties retrieving cache information on my Raspberry Pi using standard commands like lscpu, cat /proc/cpuinfo, and lstopo. Despite attempting these commands with elevated privileges (sudo), they do not provide any cache-related details.

To be more specific, lstopo shows that I have 0KB in all cache levels.

Raspberry Pi 5 has Cortex-A76 as its CPU and is supposed to have 512KB per-core L2 caches, and a 2MB shared L3 cache, in addition to 64KB per core as L1 cache.

I'm using Ubuntu, and I'm assuming that for some reason, it can't recognize the cache.

If that helps, I checked, and the file /sys/devices/system/cpu/cpu0/cache/index0/ways_of_associativity does not exist. I don't know if it's related, though.

lscpu:
Architecture: aarch64
  CPU op-mode(s): 32-bit, 64-bit
  Byte Order: Little Endian
CPU(s): 4
  On-line CPU(s) list: 0-3
Vendor ID: ARM
  Model name: Cortex-A76
    Model: 1
    Thread(s) per core: 1
    Core(s) per cluster: 4
    Socket(s): -
    Cluster(s): 1
    Stepping: r4p1
    CPU(s) scaling MHz: 83%
    CPU max MHz: 2400.0000
    CPU min MHz: 1500.0000
    BogoMIPS: 108.00
    Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
Vulnerabilities:
  Gather data sampling: Not affected
  Itlb multihit: Not affected
  L1tf: Not affected
  Mds: Not affected
  Meltdown: Not affected
  Mmio stale data: Not affected
  Retbleed: Not affected
  Spec rstack overflow: Not affected
  Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1: Mitigation; __user pointer sanitization
  Spectre v2: Mitigation; CSV2, BHB
  Srbds: Not affected
  Tsx async abort: Not affected

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Try:

for d in /sys/devices/system/cpu/cpu0/cache/index*;
  do tail -c+1 $d/{level,type,size}
  echo
done

Revision history for this message
Iftach Shalev (ifs5588) said :
#2

i triedit and got:

iftach@iftach-desktop:~$ for d in /sys/devices/system/cpu/cpu0/cache/index*; do tail -c+1 $d/{level,type,size}; echo; done
==> /sys/devices/system/cpu/cpu0/cache/index0/level <==
1

==> /sys/devices/system/cpu/cpu0/cache/index0/type <==
Data
tail: cannot open '/sys/devices/system/cpu/cpu0/cache/index0/size' for reading: No such file or directory

==> /sys/devices/system/cpu/cpu0/cache/index1/level <==
1

==> /sys/devices/system/cpu/cpu0/cache/index1/type <==
Instruction
tail: cannot open '/sys/devices/system/cpu/cpu0/cache/index1/size' for reading: No such file or directory

==> /sys/devices/system/cpu/cpu0/cache/index2/level <==
2

==> /sys/devices/system/cpu/cpu0/cache/index2/type <==
Unified
tail: cannot open '/sys/devices/system/cpu/cpu0/cache/index2/size' for reading: No such file or directory

==> /sys/devices/system/cpu/cpu0/cache/index3/level <==
3

==> /sys/devices/system/cpu/cpu0/cache/index3/type <==
Unified
tail: cannot open '/sys/devices/system/cpu/cpu0/cache/index3/size' for reading: No such file or directory

seems like the command was able to retrieve the level and type information for each cache index, but it encountered an error when trying to read the size file for each cache index.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.