cpufreq interface should cope with cluster frequency on all core of a cluster

Registered by Naresh Kamboju

On hardware such as TC2, we cannot change frequency of individual CPUs.
We only can change the frequency of a whole cluster. So the logical CPU
asking for the highest frequency will enforce that frequency on all the
logical CPUs in the same cluster.

Blueprint information

Status:
Complete
Approver:
Alexander Sack
Priority:
Medium
Drafter:
Naresh Kamboju
Direction:
Needs approval
Assignee:
Naresh Kamboju
Definition:
New
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 2013.02
Started by
Naresh Kamboju
Completed by
Naresh Kamboju

Related branches

Sprints

Whiteboard

Comments from Nico [npitre] :
In fact we'll have to expose the true frequency and cluster to the test suite somehow for validation purposes because the cpufreq interface will have to lie about the effective frequency.

On hardware such as TC2, we cannot change frequency of individual CPUs. We only can change the frequency of a whole cluster. So the logical CPU asking for the highest frequency will enforce that frequency on all the logical CPUs in the same cluster.

So, given a set of input frequencies to the official cpufreq interface on different CPUs, the test would have to verify that the resulting effective frequency and cluster on all CPUs is as expected.

For example, set frequency X on CPU0, then get effective frequency/cluster for each CPUs for validation. Then set frequency Y on CPU1 and validate the effective frequency and cluster again. And so on for a list of input frequencies.

The purpose of this test is to validate the translation between cpufreq frequencyes and the actual frequency and cluster applied by the cpufreq driver.

[nkambo 07 Feb 2013]
I have written a test case to verify ... when i change cpu freq of on cpu should change cpu freq of other cpus if they belongs to same cluster.

the attached test case is passed when switcher is disabled.
echo 0 > /sys/kernel/bL_switcher/active -- >TEST PASSED
test case FAILED when switcher is active.
echo 1 > /sys/kernel/bL_switcher/active ---- > TEST FAILED

is this test case not applicable when switcher is active?

When switcher is disable i can find out 0 and 1 are belongs to cluster 0 and 2, 3 and 4 belongs to cluster 1. when i have tested manually changing the cpu freq has effect on other cpu freq of same cluster.

for more info, please find below test execution log and test case.

https://pastebin.linaro.org/1323/

The latest test script and test results output available in below link
https://pastebin.linaro.org/1633/

[nkambo 08 Feb 2013] npitre wrote:
In the switcher off case, we do see a relation between CPU0 and 1 due to
the related mask. I suppose that changing that mask on the fly in the
switcher case would be rather nasty.

In that case, the answer to Naresh's original question is: you can't see
the cluster effect from user space when the switcher is active.

[nkambo 15 Feb 2013]
Test case created to execute test when the switcher is off.
this test case disable switcher functionality and execute. After getting results switcher will be activated back.

Tested on my local TC2 platform with Android image. results looks good to me.
Test cases integrated on to bl-iks-test suite. (bl iks core test suite).

[nkambo 15 Feb 2013]
work items for Fastmodels have been postponed, because bl IKS project do not support Fastmodel at this moment.

[nkambo 28 Feb 2013]
new test case "cpu_freq_vs_cluster_freq.sh" has been added to big.LITTLE IKS core test suite.
this test cases has been integrated on to android builds and executed as a part of bL IKS 13.02 release. all test case results are available in bL IKS core test results spreadsheet.

Meta:
Roadmap id: BIG_LITTLE_SYSTEM
Headline: Develop new test in big.LITTLE core-test which should test when the logical CPU asking for the highest frequency will enforce that frequency on all the logical CPUs in the same cluster.
Acceptance: big.LITTLE Switcher suite can run on android and ubuntu target in LAVA with latest "cpufreq of one core vs all cpufreqs on the same core" changes.

Deliverable:
- "cpu_freq_vs_cluster_freq.sh" has been added to big.LITTLE IKS core test suite.
- test case has been integrated on to android builds.. which can not be integrated on to Ubuntu builds since bL IKS project do not support Ubuntu.
- bL IKS core test results spreadsheet https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdGttYkhCUGVzZ2JOS0tGaU1QUm9wOHc#gid=10

(?)

Work Items

Work items:
Develop tests: DONE
Write scripts around : DONE
Integrate bl-agitator (for switching) while testing : POSTPONED
Test on FM Android : POSTPONED
Test on FM Ubuntu : POSTPONED
Test on TC2 platform with Android BL IKS image: DONE
Code Review: DONE
Push it in git: DONE
Test on LAVA FM Ubuntu : POSTPONED
Test on LAVA FM Android: POSTPONED
Test on LAVA target TC2 platform with Android BL IKS image: DONE
Review results on LAVA: DONE
push it in git: TODO

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.