Jump to content

Mainline Linux not running at 1Ghz (ESPRESSObin)


Anders

Recommended Posts

I'm getting tired of Globalscale deleting my post from the Espressobin forums, instead of either fixing or acknowledging the problem.

So I'll repost this here for future reference. This is the URL to the original thread: http://espressobin.net/forums/topic/mainline-linux-not-running-at-1ghz/

 

Hi All

That the Espressobin aims to support mainline is awesome – a lot of the benefits are described here http://espressobin.net/mainline-linux/.

 

But I’m unable to get my v7 board running at more than 800MHz using the mainline kernel (for some reason cpufreq-info insists on reporting 1GHz with actual benchmarking only showing 800MHz).

 

For the sake of this post, I tried pulling the most recent linux-next kernel. I’m using the config file from armbian.

export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
git checkout next-20190614
curl https://raw.githubusercontent.com/armbian/build/master/config/kernel/linux-mvebu64-next.config > .config
make oldconfig # Just picked the defaults for new options
make -j7 Image dtbs modules

cp arch/arm64/boot/Image /mnt/sdcard/boot/
cp arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb /mnt/sdcard/boot/dtb/marvell/
make modules_install INSTALL_MOD_PATH=/mnt/sdcard/

Here are the results. Notice the performance numbers and CPU Freq reported by 7-Zip:

root@espressobin:~# uname -a
Linux espressobin 5.2.0-rc4-next-20190614 #7 SMP PREEMPT Sun Jun 16 10:27:52 CEST 2019 aarch64 GNU/Linux

root@espressobin:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 0.97 ms.
  hardware limits: 200 MHz - 1000 MHz
  available frequency steps: 200 MHz, 250 MHz, 500 MHz, 1000 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 250 MHz and 1000 MHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
  cpufreq stats: 200 MHz:0.09%, 250 MHz:3.60%, 500 MHz:0.16%, 1000 MHz:96.15%  (152)
analyzing CPU 1:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 0.97 ms.
  hardware limits: 200 MHz - 1000 MHz
  available frequency steps: 200 MHz, 250 MHz, 500 MHz, 1000 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 250 MHz and 1000 MHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
  cpufreq stats: 200 MHz:0.09%, 250 MHz:3.60%, 500 MHz:0.16%, 1000 MHz:96.15%  (152)

root@espressobin:~# lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Model:                 4
CPU max MHz:           1000.0000
CPU min MHz:           200.0000
BogoMIPS:              25.00
NUMA node0 CPU(s):     0,1
Flags:                 fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid

root@espressobin:~# 7za b

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs LE)

LE
CPU Freq:   794   794   794   794   794   794   794   794

RAM size:     986 MB,  # CPU hardware threads:   2
RAM usage:    441 MB,  # Benchmark threads:      2

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:        709   148    467    690  |      17938   199    771   1532
23:        701   149    480    715  |      17737   199    770   1535
24:        696   149    503    749  |      17395   199    768   1527
25:        688   149    528    786  |      17149   198    769   1526
----------------------------------  | ------------------------------
Avr:             149    494    735  |              199    770   1530
Tot:             174    632   1133

 

The following are the performance numbers I’m looking for, achieved using 4.4.8-armada-17.02-espressobin kernel downloaded from http://espressobin.net/tech-spec/. That one, and 4.4.52-armada-17.10.4-g719fc86-dirty are the only kernels I have been able to actually get 1GHz performance with:

root@espressobin:~# uname -a
Linux espressobin 4.4.52-armada-17.10.4-g719fc86-dirty #7 SMP PREEMPT Tue Jul 3 10:59:53 UTC 2018 aarch64 GNU/Linux

root@espressobin:~# 7za b

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs LE)

LE
CPU Freq:   734   997   998   998   998   992   996   996

RAM size:     927 MB,  # CPU hardware threads:   2
RAM usage:    441 MB,  # Benchmark threads:      2

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:        870   150    563    847  |      22431   198    969   1915
23:        860   151    582    876  |      22154   198    968   1918
24:        854   151    607    918  |      21735   198    963   1908
25:        848   152    639    969  |      21341   198    960   1900
----------------------------------  | ------------------------------
Avr:             151    598    903  |              198    965   1910
Tot:             174    781   1406

Following http://wiki.espressobin.net/tiki-index.php?page=Build+From+Source+-+Kernel to build 4.4.52-armada-17.10.4-g719fc86-dirty also works fine at 1GHz.

 

I’ve tried a bunch of different U-boots, all with the same result, so I really think the bug is in Linux.

 

(FYI this is not the only problem I have been having with the v7, but lets focus on one bug at a time. Not to mention that Globalscale claims 1.2 GHz for v7 which seems entirely out of reach as any 1200 u-boot bricks my board).

Link to comment
Share on other sites

On 2/23/2020 at 3:36 AM, Anders said:

Following http://wiki.espressobin.net/tiki-index.php?page=Build+From+Source+-+Kernel to build 4.4.52-armada-17.10.4-g719fc86-dirty also works fine at 1GHz.

 

I’ve tried a bunch of different U-boots, all with the same result, so I really think the bug is in Linux.

 

(FYI this is not the only problem I have been having with the v7, but lets focus on one bug at a time. Not to mention that Globalscale claims 1.2 GHz for v7 which seems entirely out of reach as any 1200 u-boot bricks my board).

 

MV3720 can definitely be stable at 1.0GHz with DDR3 running at 400Mhz with a fair amount of heat sinkage -  but that's not espressobin

 

Bare board - you're going to run into thermal issues straight up at 800MHz, based on experience (espressobin was our ref device for my board)

Link to comment
Share on other sites

Hello! There is a bug in kernel's cpufreq driver which cause that Armada 3720 SOC is running only at 800 MHz, even it reports 1 GHz.

 

Marek sent patches which fix this issue. See link https://lore.kernel.org/linux-arm-kernel/20201009125711.0176752a@kernel.org/

 

@AndersWould you be able to test these patches and check if they are stable on your Espressobin V7 boards?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines