1.2GHz and beyond

With the new thermal readings and cpu governor, I worked a bit on my retroarch lakka versions. I enabled temperature, and cpu frequency reading on the notification bar. Have a look:

2 Likes

take care as each core get it’s own freq, and system will regularly distribute the load on other cores,
(i initially also show it but disabled as constant pooling the 4 cores was a bit too much)

Was the core speed increase something that had any effect on the alsa drivers, re: buffer underruns. I found that for Mame games that end up running ridiculously slow, it’s alsa giving underrun errors, having heavy distortion on sound and eating up all the CPU usage.
Does a change do the clock frequency have any effect on how audio drivers? Perhaps being some integer multiple of the frequency or something?
All I know is, when alsa starts acting up, my cpu usage goes haywire. Perhaps that’s why a clock rate increase helped.

Well, not in my case. I’m using the ondemand governor. I did some tests and they run always at the same speed. I also get this when I run cpufreq-info which confirms that they run at the same frequency.:

cpi@clockworkpi:~/src/RetroArch$ 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 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 244 us.
  hardware limits: 120 MHz - 1.40 GHz
  available frequency steps: 120 MHz, 240 MHz, 312 MHz, 408 MHz, 480 MHz, 504 MHz, 600 MHz, 648 MHz, 720 MHz, 816 MHz, 912 MHz, 1.01 GHz, 1.10 GHz, 1.20 GHz, 1.30 GHz, 1.40 GHz
  available cpufreq governors: ondemand, userspace, powersave, performance
  current policy: frequency should be within 120 MHz and 1.40 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.

As you can see: CPUs which run at the same hardware frequency: 0 1 2 3

Could you try to use the ondemand governor just to see if they can run in different frequencies with your kernel? If yes, I need to have a better look on your kernel, maybe I’m missing something to get it in mine, or you could help me to get this.

You mean, it would require more processing? Honestly, I was surprised that I didn’t see a considerable effect with this extra information on my RetroArch code.
Actually I have all 4 cpus freq showing (same freq in all), temp, and fps. I can also change the update interval from 1 frame to 512 frames. I normally keep it at 120 frames (~2 seconds to get updates), but I went all the way to 1 frame and I monitored the cpu load with htop. Didn’t see a considerable effect.

I also think that in the end, it could be too much information, but this is only to check how the emulators are performing, I don’t have the intention to play “for real” with all this information on my screen, but I think it is good to have when we want to know it for some reason.

1 Like

I had some problems with pulseaudio eating a lot of my processing (~10%), even when I choose Alsa as my audio driver in retroarch.

I needed to uninstall pulseaudio to actually disable it. I think if you have it installed, your system will use it to communicate to Alsa anyway.

If you uninstall you will miss Bluetooth audio support, and maybe some apps that are compiled to only use pulseaudio would stop working.

So, can you check when you load your emulator if you have a pulseaudio process running?

1 Like

hmmm you’re right, each core got same frequency,

[gs@gs ~]$ cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_cur_freq
120000
120000
120000
120000

that’s not what i saw months ago, strange Oo

you’re also right on ondemand who’s not set min/max but is stepped too, i may drink too much %)

read freq is not very costly but need pretty fast pooling as we cannot watch these for file update event :confused:

2 Likes

Do you think that you could have seen a changing in the clock in the cores at the same time you ran cat
? What I mean is that, for instance, when you read the clocks for the first two cores, it was one value, and then the clock speed changed before you asked for the third and fourth core.

Here, if I keep asking for the clock speed, at some point I will see different clocks for different cores:

Look this:

cpi@clockworkpi:~/src/RetroArch$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
240000
240000
240000
1400000
cpi@clockworkpi:~/src/RetroArch$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
1400000
1400000
1400000
1400000
cpi@clockworkpi:~/src/RetroArch$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
408000
1300000
1300000
1300000
cpi@clockworkpi:~/src/RetroArch$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
408000
408000
1300000
1300000
cpi@clockworkpi:~/src/RetroArch$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

I actually think that it would be strange to enable different clock speeds for different cores in our SOC because all the cores share the same power rail. If it supports different clocks for the cores it would be better to separate the power for each core (different voltages for each core). It would be nice to have this feature anyway.

1 Like

maybe when i tried i was get non constant load with a lot of fast freq change and the cat delay may have disconcert my conclusion

doesn’t know how all is wired into hardware, but as frequency may change depending on the load and each core don’t have the same load i was find logic having different freq for each cores

i would think we could even set it manually, that’s sad we cannot :confused:

[gs@gs ~]$ sudo cpupower --cpu 2 frequency-set -f 200000
Setting cpu: 2
[gs@gs ~]$ sudo cpupower --cpu 0 frequency-set -f 400000
Setting cpu: 0
[gs@gs ~]$ sudo cat /sys/devices/system/cpu/cpu?/cpufreq/cpuinfo_cur_freq
408000
408000
408000
408000
[gs@gs ~]$ sudo cpupower --cpu 2 frequency-set -f 200000
Setting cpu: 2
[gs@gs ~]$ sudo cat /sys/devices/system/cpu/cpu?/cpufreq/cpuinfo_cur_freq
240000
240000
240000
240000

i hope when i shutdown cores they are really set off !

1 Like