MVEBU: Low performance on Armada 370, Level 2 cache disabled?

Thanks @anomeome for checking the registers on your device.

I compared the mamba device tree file with the LS421DE one, to see if it had something missing. And I found this node not defined in my device:


&coherencyfab {
	broken-idle;
};

I added that node to my dts, compiled again the firmware and these are the results:

root@OpenWrt:~# cat /proc/version
Linux version 5.4.75 (dani@tool) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r0-c78e123)) #0 SMP Tue Nov 10 12:11:32 2020
root@OpenWrt:~# devmem 0xd0008100
0x00000001
root@OpenWrt:~# devmem 0xd0008104
0x1A086302
root@OpenWrt:~# wget -O- http://192.168.1.7:8000/bigfile.bin > /dev/null
--2020-11-10 09:23:14--  http://192.168.1.7:8000/bigfile.bin
Connecting to 192.168.1.7:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2602501255 (2.4G) [application/octet-stream]
Saving to: 'STDOUT'

-                    100%[=====================>]   2.42G  76.9MB/s    in 31s     

2020-11-10 09:23:45 (80.4 MB/s) - written to stdout [2602501255/2602501255]

root@OpenWrt:~#

Now the cache is indeed enabled and I get the expected performance, almost identical as with the stock firmware.

The apparently innocuous broken-idle property for the coherency fabric solved the issue.

I'll send a patch in next hours to fix this problem.

Regards

3 Likes