ODROID-C2 running at 1.53GHz?

This forum is for supported devices using an ARMv7 Amlogic SoC.

ODROID-C2 running at 1.53GHz?

Postby krovetz » Fri Aug 05, 2016 4:55 pm

Over at the SUPERCOP cryptography benchmarking project we're seeing some indications that the C2 running alarm may be actually running at 1.53GHz even though it thinks it's running at 2.0GHz. Two separately designed programs that experimentally determine clock speed both said 1.53GHz. Does anybody have an idea why this might be? Is it even possible? How could I verify or refute our suspicion?

Thanks,
Ted

$this->bbcode_second_pass_code('', '
=== Wed Aug 3 07:41:20 PDT 2016 === Trying cortex.c with gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv...
cortex 1535975592 1536096523 8 8 8 8 10 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
=== Wed Aug 3 07:41:23 PDT 2016 === Success. Using cortex.c.
...
=== Wed Aug 3 07:40:02 PDT 2016 === grep . /dev/null /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:performance
=== Wed Aug 3 07:40:02 PDT 2016 === grep . /dev/null /sys/devices/system/cpu/cpu*/cpufreq/scaling_setspeed
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed:<unsupported>
/sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed:<unsupported>
/sys/devices/system/cpu/cpu2/cpufreq/scaling_setspeed:<unsupported>
/sys/devices/system/cpu/cpu3/cpufreq/scaling_setspeed:<unsupported>
=== Wed Aug 3 07:40:02 PDT 2016 === grep . /dev/null /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:2016000
/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq:2016000
/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq:2016000
/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:2016000
')

All of the following guessed frequencies are neat fractions of 1.53GHz, but not of 2.0Ghz.
$this->bbcode_second_pass_code('', '
[krovetz@par3 tmp]$ ./measure -f 1536
0: fmul1d: 3067 MHz (1.000000 / cycle ; 3068.8)[1.997927 ?]
0: fmla1d: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: fmla1dSA: 1533 MHz (1.000000 / cycle ; 1534.4)[0.998963 ?]
0: fmla1ddep: 200 MHz (1.000000 / cycle ; 191.8)[0.124899 ?]
0: fmul2d: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: fmla2d: 1533 MHz (1.000000 / cycle ; 1534.4)[0.998963 ?]
0: fmla2dIL: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: fmla2dSA: 1533 MHz (1.000000 / cycle ; 1534.4)[0.998963 ?]
0: fmul1s: 3067 MHz (1.000000 / cycle ; 3068.8)[1.997927 ?]
0: fmla1s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: fmul2s: 3067 MHz (1.000000 / cycle ; 3068.8)[1.997927 ?]
0: fmla2s: 3067 MHz (1.000000 / cycle ; 3068.8)[1.997927 ?]
0: fmul4s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: fmla4s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: ld12s: 1533 MHz (1.000000 / cycle ; 1533.6)[0.998416 ?]
0: ld14s: 767 MHz (1.000000 / cycle ; 767.1)[0.499436 ?]
0: ld22s: 767 MHz (1.000000 / cycle ; 767.1)[0.499413 ?]
0: ld24s: 400 MHz (1.000000 / cycle ; 383.6)[0.249758 ?]
0: ld42s: 400 MHz (1.000000 / cycle ; 383.6)[0.249758 ?]
0: ld44s: 200 MHz (1.000000 / cycle ; 191.8)[0.124886 ?]
0: st12s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: st22s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: xor8b: 3067 MHz (1.000000 / cycle ; 3068.8)[1.997927 ?]
0: xor16b: 1533 MHz (1.000000 / cycle ; 1534.4)[0.998963 ?]
0: xor16bdep: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: xor16badd4sdep: 1033 MHz (1.000000 / cycle ; 1023.4)[0.666301 ?]
0: add2s: 3067 MHz (1.000000 / cycle ; 3068.8)[1.997927 ?]
0: add4s: 1533 MHz (1.000000 / cycle ; 1534.4)[0.998963 ?]
0: add4sdep: 767 MHz (1.000000 / cycle ; 767.4)[0.499596 ?]
0: sri4s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
0: sri4sdep: 767 MHz (1.000000 / cycle ; 767.3)[0.499573 ?]
0: trn1trn24s: 1533 MHz (1.000000 / cycle ; 1534.4)[0.998963 ?]
0: uzp1uzp24s: 1533 MHz (1.000000 / cycle ; 1534.3)[0.998872 ?]
[krovetz@par3 tmp]$
')
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: ODROID-C2 running at 1.53GHz?

Postby WarheadsSE » Fri Aug 05, 2016 5:25 pm

Have you run these same tests on other distributions?
Are you monitoring the temperature as you're doing this as well?

Where is the code for this test, so that we may also evaluate the efficacy? (https://bench.cr.yp.to/supercop.html ?)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ODROID-C2 running at 1.53GHz?

Postby krovetz » Fri Aug 05, 2016 6:07 pm

It basically reads the cycle counter, sleeps for a second, reads the cycle counter, and calculates the frequency using the elapse time and cycles

$this->bbcode_second_pass_code('', '
long long cpucycles_cortex(void)
{
long long Rt;
asm volatile("mrs %0, PMCCNTR_EL0" : "=r" (Rt));
return Rt;
}
long long cpucycles_cortex_persecond(void) {
struct timeval t0,t1;
long long c0,c1;
double d0,d1;
gettimeofday(&t0,(struct timezone *) 0);
c0 = cpucycles_cortex();
sleep(1);
gettimeofday(&t1,(struct timezone *) 0);
c1 = cpucycles_cortex();
d0 = (double) t0.tv_sec;
d0 += ((double) t0.tv_usec) / 1000000.0;
d1 = (double) t1.tv_sec;
d1 += ((double) t1.tv_usec) / 1000000.0;
return (c1-c0)/(d1-d0);
}
')

Here is the actual code in a test program

https://dl.dropboxusercontent.com/u/318 ... x_freq.zip

You'll need to enable access to performance counters:

cd enable_arm_pmu
make
sudo ./load_module

You can verify success by looking at the tail of dmesg. Then run the test

cd ..
gcc test.c cortex.c
./a.out
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: ODROID-C2 running at 1.53GHz?

Postby krovetz » Sat Aug 27, 2016 2:51 pm

Over at Hardkernel they have verified that there is a problem.

http://forum.odroid.com/viewtopic.php?f=141&t=23044

Here's their statement:

$this->bbcode_second_pass_quote('odroid', 'P')lease don't waste your valuable time.
All the Coretex-A53 based Amlogic SoCs have the same issue. S905, S905 Rev-C(S905H), S905X and even S912.
The kernel clock frequency 1.75 and 2Ghz do not exist in the BL3x blobs.
It must be Amlogic's fault. But we should detect it earlier in our internal development stage. Really sorry about that mistake.

We've been modifying/testing the BL3x code to find a maximum feasible/stable clocks like 1.53Ghz, 1.58Ghz, 1.61Ghz, 1.65Ghz, 1.68Ghz, 1.71Ghz, etc for a couple of weeks.
But 1.65Ghz seems to be the maximum one due to some power and heat issues. We will run the burnA53 on Ubuntu and the Stress app on Android with 10 set of C2 boards in this weekend (for 48 hours stability test) to make sure it.
Once we will have a test result, we will report it on this thread with update package for further sampling test in early next week.

If we disable two cores, the SoC can run up to 1.75Ghz probably. But we need further stability test too.
And yes. I fully agree most people don't like this approach.

Anyway, we know well 1.65Ghz or 1.75Ghz is still very far from the 2Ghz. So we will change the C2 specification in our home page next week as per the test result.
And we must consider some compensation for C2 users. But we need to check what we can do first.

Please accept my sincere apologies for the mistake and kindly understand our situation.
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: ODROID-C2 running at 1.53GHz?

Postby krovetz » Sat Sep 10, 2016 12:12 am

FYI HardKernel has pushed out their fixes for this problem to their own distribution. The C2 cannot run stably much faster than 1.5 GHz. They tried all combination of frequencies and numbers of CPUs running.

http://odroid.com/dokuwiki/doku.php?id= ... t_cpu_freq

The fastest 4-core setting they found stable is 1.656 GHz, but they're keeping their default setting at 1.536. You can up the speed and change the number of cores to boot via boot.ini.

$this->bbcode_second_pass_quote('odroid', 'I')f you update kernel with [c]sudo apt update && sudo apt upgrade && sudo apt dist-upgrade[/c], you will have "3.14.77-80" or higher.
And there will be new items in the new boot.ini to control the CPU clock options.
https://github.com/mdrjr/c2_bootini/blo ... t.ini#L101

Refer this WiKi page too.
http://odroid.com/dokuwiki/doku.php?id= ... t_cpu_freq
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm


Return to Amlogic

Who is online

Users browsing this forum: No registered users and 3 guests