Re: [PATCH V3 9/9] cpufreq: scmi: Use .register_em() to register with energy model
From: Lukasz Luba
Date: Tue Aug 31 2021 - 12:18:01 EST
Hi Viresh,
My apologies for delay I was on holidays. I've seen the pull requests,
so it's too late, but just for history...
I have tested this new callback with hacked juno FW which works in
the per-cpu perf requests. There are no issues.
Some debug prints:
[ 3.110072] cpu cpu0: cpumask weight(opp_shared_cpus)=4 weight
policy->cpus=1
[ 3.117666] cpu cpu0: Empty OPP table
[ 3.121418] cpu cpu0: OPP table empty
[ 3.131367] cpu cpu0: EM: created perf domain
[ 3.137848] cpu cpu1: cpumask weight(opp_shared_cpus)=2 weight
policy->cpus=1
[ 3.145220] cpu cpu1: Empty OPP table
[ 3.148961] cpu cpu1: OPP table empty
[ 3.158193] cpu cpu1: EM: created perf domain
[ 3.164325] cpu cpu2: cpumask weight(opp_shared_cpus)=2 weight
policy->cpus=1
[ 3.173430] cpu cpu3: cpumask weight(opp_shared_cpus)=4 weight
policy->cpus=1
[ 3.181947] cpu cpu4: cpumask weight(opp_shared_cpus)=4 weight
policy->cpus=1
[ 3.190620] cpu cpu5: cpumask weight(opp_shared_cpus)=4 weight
policy->cpus=1
root@sqwt-ubuntu:~# grep . /sys/kernel/debug/energy_model/cpu0/ps\:*/*
/sys/kernel/debug/energy_model/cpu0/ps:450000/cost:79
/sys/kernel/debug/energy_model/cpu0/ps:450000/frequency:450000
/sys/kernel/debug/energy_model/cpu0/ps:450000/power:42
/sys/kernel/debug/energy_model/cpu0/ps:575000/cost:85
/sys/kernel/debug/energy_model/cpu0/ps:575000/frequency:575000
/sys/kernel/debug/energy_model/cpu0/ps:575000/power:58
/sys/kernel/debug/energy_model/cpu0/ps:700000/cost:95
/sys/kernel/debug/energy_model/cpu0/ps:700000/frequency:700000
/sys/kernel/debug/energy_model/cpu0/ps:700000/power:79
/sys/kernel/debug/energy_model/cpu0/ps:775000/cost:106
/sys/kernel/debug/energy_model/cpu0/ps:775000/frequency:775000
/sys/kernel/debug/energy_model/cpu0/ps:775000/power:97
/sys/kernel/debug/energy_model/cpu0/ps:850000/cost:119
/sys/kernel/debug/energy_model/cpu0/ps:850000/frequency:850000
/sys/kernel/debug/energy_model/cpu0/ps:850000/power:119
root@sqwt-ubuntu:~# cat /sys/kernel/debug/energy_model/cpu0/cpus
0,3-5
root@sqwt-ubuntu:~# cat /sys/kernel/debug/energy_model/cpu1/cpus
1-2
root@sqwt-ubuntu:~# grep . /sys/kernel/debug/energy_model/cpu1/ps\:*/*
/sys/kernel/debug/energy_model/cpu1/ps:1100000/cost:583
/sys/kernel/debug/energy_model/cpu1/ps:1100000/frequency:1100000
/sys/kernel/debug/energy_model/cpu1/ps:1100000/power:583
/sys/kernel/debug/energy_model/cpu1/ps:450000/cost:391
/sys/kernel/debug/energy_model/cpu1/ps:450000/frequency:450000
/sys/kernel/debug/energy_model/cpu1/ps:450000/power:160
/sys/kernel/debug/energy_model/cpu1/ps:625000/cost:420
/sys/kernel/debug/energy_model/cpu1/ps:625000/frequency:625000
/sys/kernel/debug/energy_model/cpu1/ps:625000/power:239
/sys/kernel/debug/energy_model/cpu1/ps:800000/cost:471
/sys/kernel/debug/energy_model/cpu1/ps:800000/frequency:800000
/sys/kernel/debug/energy_model/cpu1/ps:800000/power:343
/sys/kernel/debug/energy_model/cpu1/ps:950000/cost:525
/sys/kernel/debug/energy_model/cpu1/ps:950000/frequency:950000
/sys/kernel/debug/energy_model/cpu1/ps:950000/power:454
root@sqwt-ubuntu:~#
Regards,
Lukasz