On 08/21/2015 12:57 AM, Leo Yan wrote:
[...]
Hardware Environment
- Platform: 96boards Hikey
- SoC: Hi6220, 2 clusters, 4xCA53 CPUs in each cluster
- CPU clock: 2 clusters with 8 CPUs have coupled clock source and support 208mHz/432mHz/729mHz/960mHz/1200mHz
- Support CPU and cluster level low power mode
Software Environment
- Kernel: 4.2rc4 + EAS RFCv5
Could you share the platform adaptation code [especially arch/arm64/kernel/topology.c]. I'm interested in the Energy Model you're using and where you put the SD_SHARE_CAP_STATES sd flag :-)
Thanks for reminding, directly used the same energy model with Juno which Juri shared with me. I recognized need change code like below so that can best match for my case; will do second round profiling and update with you.
That's true for this platform. The direct dependency is in sched_group_energy():
5051 /* 5052 * Is the group utilization affected by cpus outside this 5053 * sched_group? 5054 */ 5055 sd = highest_flag_domain(cpu, SD_SHARE_CAP_STATES);
Since you can't measure power on this board yet you can't create your own EM. Using the Juno one is fine but you have to adapt the 'struct capacity_state' arrays for the A53 and the clusters.
You have '208mHz/432mHz/729mHz/960mHz/1200mHz' whereas the A53 on Juno R0 has '450000 575000 700000 775000 850000'
So both have 5 OPPs. That means you could just take the values from Juno except the fact that the highest OPP on A53 does not have a .cap value of 1024 because on Juno you have the big cluster as well. I would rescale the .cap values to 1024 for the highest OPP, just to be save. The A53 at 1200000 is the highest capacity value available so it should be 1024. Maybe you did this already ...
Another thing ... Did you adapt the rt-app-X.json files to 8 cpus?
static inline int cpu_corepower_flags(void) { return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN | \ SD_SHARE_CAP_STATES; }
static inline int cpu_cluster_flags(void) { return SD_SHARE_CAP_STATES; }
static struct sched_domain_topology_level arm64_topology[] = { #ifdef CONFIG_SCHED_MC { cpu_coregroup_mask, cpu_corepower_flags, cpu_core_energy, SD_INIT_NAME(MC) }, #endif { cpu_cpu_mask, cpu_cluster_flags, cpu_cluster_energy, SD_INIT_NAME(DIE) }, { NULL, }, };
Thanks, Leo Yan