(XA2) Usage of Cpufreq

Hi there folks

Since yesterday I’ve been playing around with cpufreq on my Xperia XA2.
I got a couple of questions regarding that:

  1. Program sees 8 cpus named 0,1,2,3,4,5,6,7. First four are equal and uses the same frequecies. Second fours (4,5,6,7) are equal to each other and use same frequieces but ones that differ from first four. I’m almost sure that those are cpu cores, right?

  2. I have no problem setting first four (0,1,2,3) in matter of frequecy and govenor, just like that:

cpufreq-info -c1
current policy: frequency should be within 1.67 GHz and 2.21 GHz. The governor “performance” may decide which speed to usewithin this range.

This is from executing:
cpufreq-set -u 2.21Ghz
cpufreq-set -d 1.67Ghz

Governor is performance because of:
cpufreq-set -g performance
Which executes correctly

But this is only applying for first four cores
The last four are unaffected. Even if execute above commands adding which cores this should affect it still doing this for the first four.

How to change behavior of cores 4,5,6,7? Namely the governor and frequency scalling?
If I try to change governor for specific core this happens:
[root@XperiaXA2 defaultuser]# cpufreq-set -g ondemand -c5
Error setting new values. Common errors:

  • Do you have proper administration rights? (super-user?)
  • Is the governor you requested available and modprobed?
  • Trying to set an invalid policy?
  • Trying to set a specific frequency, but userspace governor is not available,
    for example because of hardware which cannot be set to a specific frequency
    or because the userspace governor isn’t loaded?
    [root@XperiaXA2 defaultuser]#

It doesnt matter what governor I choose

If I try to change freq scalling adding let’s say -c5 it executes correctly but this affects first four 0,1,2,3 cores even if frequencies doesnt match. There is no change in cores 4,5,6,7

And so, how to make those setting apply after reboot?

1 Like

Anybody? I need squeeze out most performance that device has to offer. So I need to have control of all of the 8 cores.
But still if I have control of half od that, how to apply those settings automaticly after each reboot?

ARM is not x86.

Read up on big.LITTLE technology in ARM.

(…and don’t try to apply x86 desktop PC methods on an Android-Linux hodgepodge on mobile platform system like SFOS.)

1 Like

So any other methods? Anyway why some functions works if it is different arch? And why it is available in openrepos and installs without any problems on SFOS?

Well there is zgovernor you can try.

But most efforts in the mobile space aim to maximize power saving, not performance, so YMMV.

Is not possible to find it anywere.

So can someone help me with Cpufreq

What I have so far, |I can cotrol governor for first four cores 0,1,2,3
Can control frequency scalling, but

  1. Cannot save the settings into one file, like powersave, fullpower
  2. Cannot get setting to load at atartup
  3. Can’t affect in any possible way last four cores 4,5,6,7/

Can someone help? Cpufreq seems to be a nice tool and I would like to stay with it

1 Like

Really? Nobody never done this? Maybe at least points 1 and 2?

  1. Save setting to a file to easy apply them? With some script maybe?
  2. Make some specific settings to apply on startup
  3. Levae thos four last cores. It seems to first four affect performance and battery just enough at least for my needs/

So if somebody can help me with first two it would be nice

I made a simple scrpit:

#!/bin/bash
cpufreq-set -g performance
cpufreq-set -d 2.21Ghz
cpufreq-set -u 2.21Ghz

But after chmod +x when I try ./power.sh I get file not found, what am I doing wrong?

This is shown here:

To answer your question why nobody has tried this: I don’t think there is some simple magic setting that doubles my performance and/or battery life. As nephros said, the core usage is already aimed at maximizing power saving dynamically. Manually tweaking will probably do more harm than good, especially without a more deeper knowledge. Just my two cents anyway…

1 Like

Try giving the full path to cpufreq-set in the script.

Also, the performance governor afaik will simply make the CPUs run at max frequency independent from any load.

All you will get from that is battery drain, heat and wear. And little to no performance gain.

Gyus I understand some scepticism about this. I know limitations of such hardware. This is just me tryging to get most of what i have in my limited understanding of this. And I also know that performance governor doesn’t care what’s the lowest possible frequency. But I have this twisted need of having it where i want it to be :slight_smile:

Gonna test those above with full paths soon.

Also little oftop, would having swap partition on fast microsd help with performance under “lot’s of apps running at the same time” conditions? Mix of android and sfos

Here’s some discussions about swap files and things:

If adding more swap I’d opt for a file rather than a partition. And whether SD would be faster than than internal storage would remain to be bechmarked. Probably not, but then SD Cards are discardable, internal flash memory less so :wink:

This was one and only solution with n900 times, since really the start of it. I remember having some cards that performed faster as swap than internal memory of n900 it was even nticeable in day to day use. Don’t know how much faster interal memory really is in XA2 compared to n900’s. We all know that memory bottleneck from maemo, I think in overloaded sfos it seems similiar