vkmrpi3
Posts: 4
Joined: Sun Apr 24, 2016 9:30 pm

L1 L2 Cache size in Raspberry Pi3

Mon Apr 25, 2016 9:43 am

Hi,

Is there any documentation on Raspberry Pi3 which specifies the L1 and L2 cache sizes? I did some searching to see if there are related posts. But I couldnt find a satisfying answer to this. Especially there seems to be quite a few threads on "disable_l2cache" in /boot/config.txt. But it is not clear if this is relevant to Raspberry Pi3. I tried setting this to disable_l2cache = 0 in /boot/config.txt, but faced a few issues after that (For example my web browser kept crashing and omxplayer refused to play audio). So I had to comment out this line and leave it to default setting i.e disable_l2cache=1. Also, there is no cache entry in /sys/devices/system/cpu/cpu0/ in my raspbian (I am not sure why this is so, there are a few posts on this where people have indeed complained about this)

So, I did some experiments using simple C code using capacity cache misses with buffers of different sizes and determined that PI3 in fact has 16KB of L1 and 512KB of L2. Can anyone confirm if this is correct?

Also, can anyone please point to the Broadcom BCM2837 64bit SoC data sheet? Cannot find it anywhere after searching for quite sometime now.

Thanks,
vkmrpi3.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2783
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: L1 L2 Cache size in Raspberry Pi3

Mon Apr 25, 2016 10:52 am

The specs were listed in the MagPi at launch: https://www.raspberrypi.org/magpi/raspb ... enchmarks/
L1 is 32KB, L2 is 512KB.

jahboater
Posts: 5430
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: L1 L2 Cache size in Raspberry Pi3

Mon Apr 25, 2016 12:29 pm

I wonder if that's 16KB instruction plus 16KB data which would agree with tested value.
"We are in the beginning of a mass extinction, and all you can talk
about is money and fairy tales of eternal economic growth."
- Greta Thunberg

vkmrpi3
Posts: 4
Joined: Sun Apr 24, 2016 9:30 pm

Re: L1 L2 Cache size in Raspberry Pi3

Mon Apr 25, 2016 7:49 pm

Ok thanks, that adds up now and in line with the results that I am seeing. 16KB L1P (Instruction) and 16KB L1D(Data) and 512KB L2 on Pi3.

Any comments on the other three points in my query?
1. Why there is no cache entry in /sys/devices/system/cpu/cpu0/? Any possibility of updating the Raspbian image to include this soon?
2. Just to confirm disable_l2cache is something not to be meddled with on Pi3 I would assume?
3. Broadcom BCM2837 SoC datasheet link please.

Thanks.

diorga
Posts: 1
Joined: Sun Jun 25, 2017 3:20 pm

Re: L1 L2 Cache size in Raspberry Pi3

Sun Jun 25, 2017 3:24 pm

If you want to know more information about the cache system, I think that the easiest way is to check out the processor documentation from ARM:
http://infocenter.arm.com/help/index.js ... CFDAH.html

Return to “Advanced users”