I run multi-threaded programs, such as 8 threads, 16 threads, 32 threads, I found that the large core’s CPU frequency are 903 MHz, the small core are 533 MHz, how can I increase cpu performance. Thank you.
I have already tried:
echo 99999999> / sys / class / thermal / thermal_zone0 / sustainable_power
Almost no change.
root@linaro-developer:~# uname -a
Linux linaro-developer 4.14.0-rc7-linaro-hikey960
If I’m not wrong the CPU frequency is decided by ‘governor’ which is by default configured to ‘ondemand’, meaning that 903MHz is a ‘normal’ frequency when board is idle, actually this is the minimum ‘limit’ for the A73 core.
There are two cpufreq policies available in sysfs (/sys/devices/system/cpu/cpufreq/policy*) one for the LITTLE cores (Cortex-A53) and one for the big cores (Cortex-A73). Two governors are available, the default ‘ondemand’ and the ‘performance’ one. You can change the governor by echoing into ‘scaling_governor’ file (e.g echo performance > scaling_governor). Changing the governor to ‘performance’ will set the cores to the maximum frequency available.
Note that ‘ondemand’ governor sets the CPU frequency depending on the current system load. Although requesting some latency to switch core frequency, it is known to be well adapted in most cases.
The “performance” governor sets the CPU statically to the highest frequency (scaling_max_freq), however if the core reaches dangerous temperature limits, frequency can be throttled based on the mentioned sustainable_power value, need @leo-yan confirmation on this point . If all software limits/barriers are removed, ‘hardware’ forces cpu to degraded mode in case of exceeding limits. So I assume you can end with a less efficient system with performance governor… especially with the original little heatsink.
It depends on what is performed by the threads, if threads spend time sleeping (syscall, semaphore,…) this is not so much load.
Exactly. And the SoC cannot dissipate heat when all CPUs run at higher frequency; the high temperature will increase power static leakage, and then will increase to higher termperature… so this is why the CPU frequency must be limited to low frequency.
Is there a way to force the hikey 960 cores to 533/903 Mhz regardless of the demand? We’re experiencing thermal issues with our prototype and are seeking ways to let it heat up less quickly by locking down the clocks.
When the core temperatures are above 75 degrees, the cores are already clocked to their lowest frequencies, but by locking it down, we hope to reach that point somewhat later in time.
Unfortunately we don’t have a lot of space for heatsinks and big fans. The 2.5mm heatsink plus 3mm microfan we now have sandwiched between our mezzanine PCB and the CPU doesn’t make a big difference.