Plain DFS (no voltage scaling)
Hello,
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsi
I found the cpufreq-dt binding doc:
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txt
Something is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Regards.
Quoted 7 lines · Mason
Hello,
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
Quoted 7 lines
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtSomething is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Wouldn't matter if there is no regulator. i.e. you should keep 0, but even if they have something non-zero, core code will ignore it. But yeah, it makes sense to keep it zero.
Signature · 1 line
viresh
Quoted 11 lines · Viresh Kumar
Quoted 10 lines · Mason
Hello,
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txt
Quoted 8 lines
Quoted 4 lines
Something is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Wouldn't matter if there is no regulator. i.e. you should keep 0, but even if they have something non-zero, core code will ignore it. But yeah, it makes sense to keep it zero.
Hmmm, I am missing something obvious.
My config contains:
CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_GOV_COMMON=yCONFIG_CPU_FREQ_STAT=yCONFIG_CPU_FREQ_STAT_DETAILS=yCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_ONDEMAND=yCONFIG_CPUFREQ_DT=y
Yet, neither dt_cpufreq_probe() nor cpufreq_init() are being called.
Could someone please point to my mistake?
Regards.
Quoted 34 lines · Mason
Quoted 11 lines · Viresh Kumar
Quoted 10 lines · Mason
Hello,
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtQuoted 8 lines
Quoted 4 lines
Something is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Wouldn't matter if there is no regulator. i.e. you should keep 0, but even if they have something non-zero, core code will ignore it. But yeah, it makes sense to keep it zero.
Hmmm, I am missing something obvious.
My config contains:
CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_GOV_COMMON=yCONFIG_CPU_FREQ_STAT=yCONFIG_CPU_FREQ_STAT_DETAILS=yCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_ONDEMAND=yCONFIG_CPUFREQ_DT=y
Quoted 3 lines
Yet, neither
dt_cpufreq_probe()norcpufreq_init()are being called.Could someone please point to my mistake?
You need to create a platform device to get cpufreq-dt driver probed. Check other users..
Signature · 1 line
viresh
Quoted 35 lines · Viresh Kumar
Quoted 34 lines · Mason
Quoted 11 lines · Viresh Kumar
Quoted 10 lines · Mason
Hello,
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtQuoted 8 lines
Quoted 4 lines
Something is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Wouldn't matter if there is no regulator. i.e. you should keep 0, but even if they have something non-zero, core code will ignore it. But yeah, it makes sense to keep it zero.
Hmmm, I am missing something obvious.
My config contains:
CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_GOV_COMMON=yCONFIG_CPU_FREQ_STAT=yCONFIG_CPU_FREQ_STAT_DETAILS=yCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_ONDEMAND=yCONFIG_CPUFREQ_DT=y
Quoted 6 lines
Quoted 3 lines
Yet, neither
dt_cpufreq_probe()norcpufreq_init()are being called.Could someone please point to my mistake?
You need to create a platform device to get cpufreq-dt driver probed. Check other users..
The sunxi guys pointed me in the right direction.
http://lxr.free-electrons.com/source/arch/arm/mach-sunxi/sunxi.c#L20
Why isn't there a compatible string like other drivers?
Such as
compatible = "cpufreq-dt"
which would enable cpufreq on the platform?
Regards.
Quoted 9 lines · Mason
The sunxi guys pointed me in the right direction.
http://lxr.free-electrons.com/source/arch/arm/mach-sunxi/sunxi.c#L20
Why isn't there a compatible string like other drivers?
Such as
compatible = "cpufreq-dt"
which would enable cpufreq on the platform?
Because DT can't have nodes for virtual devices :(
Signature · 1 line
viresh
Quoted 5 lines · Mason
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
Quoted 7 lines
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtSomething is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Someone pointed out that tweaking the frequency without tweaking the voltage might be counter-productive.
I measured the power consumption of the entire board (at the power outlet) for 3 CPU frequencies (all other things being equal, I hope).
idle @ 111 MHz = 4.6 W
idle @ 333 MHz = 4.6 W
idle @ 999 MHz = 4.6 W
load @ 111 MHz = 5.0 W
load @ 333 MHz = 5.7 W
load @ 999 MHz = 7.7 W
When idle, the kernel calls WFI, which "turns off" most of the CPU (clock gating?) such that the actual frequency does not matter.
At full load (I use cpuburn to jog as many FUs simultaneously as possible) it looks like each additional MHz requires ~3 mW.
So it would appear that an on-demand governor might not help to save power.
But I have another use-case in mind: CPU throttling on over-heating. There's a temperature sensor in the CPU, and I'd like to say:
"if temperature exceeds a user-set threshold, don't run at the max frequency until the temperature becomes reasonable".
And I think that requires cpufreq?
Regards.
Quoted 29 lines · Mason
Quoted 5 lines · Mason
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
Quoted 7 lines
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtSomething is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Someone pointed out that tweaking the frequency without tweaking the voltage might be counter-productive.
I measured the power consumption of the entire board (at the power outlet) for 3 CPU frequencies (all other things being equal, I hope).
idle @ 111 MHz = 4.6 W
idle @ 333 MHz = 4.6 W
idle @ 999 MHz = 4.6 Wload @ 111 MHz = 5.0 W
load @ 333 MHz = 5.7 W
load @ 999 MHz = 7.7 W
Quoted 8 lines
When idle, the kernel calls WFI, which "turns off" most of the CPU (clock gating?) such that the actual frequency does not matter.
At full load (I use cpuburn to jog as many FUs simultaneously as possible) it looks like each additional MHz requires ~3 mW.
So it would appear that an on-demand governor might not help to save power.
Why do you say so ?
Quoted 8 lines
But I have another use-case in mind: CPU throttling on over-heating. There's a temperature sensor in the CPU, and I'd like to say:
"if temperature exceeds a user-set threshold, don't run at the max frequency until the temperature becomes reasonable".And I think that requires cpufreq?
Regards.
Signature · 1 line
viresh
Quoted 33 lines · Viresh Kumar
Quoted 32 lines · Mason
Quoted 5 lines · Mason
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
Quoted 7 lines
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtSomething is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Someone pointed out that tweaking the frequency without tweaking the voltage might be counter-productive.
I measured the power consumption of the entire board (at the power outlet) for 3 CPU frequencies (all other things being equal, I hope).
idle @ 111 MHz = 4.6 W
idle @ 333 MHz = 4.6 W
idle @ 999 MHz = 4.6 Wload @ 111 MHz = 5.0 W
load @ 333 MHz = 5.7 W
load @ 999 MHz = 7.7 WWhen idle, the kernel calls WFI, which "turns off" most of the CPU (clock gating?) such that the actual frequency does not matter.
Quoted 7 lines
Quoted 5 lines
At full load (I use cpuburn to jog as many FUs simultaneously as possible) it looks like each additional MHz requires ~3 mW.
So it would appear that an on-demand governor might not help to save power.
Why do you say so ?
Here's my (possibly incorrect) reasoning:
If the CPU is idle, kernel calls WFI and frequency apparently doesn't matter.
If the CPU has work to do, the on-demand governor will bump the frequency to the max (I think).
I don't think the CPU spends a lot of time in the intermediate frequencies (neither max nor min).
But maybe my logic is flawed?
Also, some users (of our older kernel) reported problems were they considered the on-demand governor was "too slow" to ramp the frequency up. (But I don't know if they'd played with the configuration knobs.)
Regards.
Quoted 31 lines · Mason
Quoted 30 lines · Viresh Kumar
Quoted 29 lines · Mason
Quoted 5 lines · Mason
I plan to enable the on-demand governor on the tango platform:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/tango4-smp8758.dtsiI found the cpufreq-dt binding doc:
Quoted 7 lines
https://www.kernel.org/doc/Documentation/devicetree/bindings/cpufreq/cpufreq-dt.txt
https://www.kernel.org/doc/Documentation/devicetree/bindings/opp/opp.txtSomething is not clear to me:
If my platform cannot scale the voltage, what information should I put in the voltage part of the DT?
Someone pointed out that tweaking the frequency without tweaking the voltage might be counter-productive.
I measured the power consumption of the entire board (at the power outlet) for 3 CPU frequencies (all other things being equal, I hope).
idle @ 111 MHz = 4.6 W
idle @ 333 MHz = 4.6 W
idle @ 999 MHz = 4.6 Wload @ 111 MHz = 5.0 W
load @ 333 MHz = 5.7 W
load @ 999 MHz = 7.7 W
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
When idle, the kernel calls WFI, which "turns off" most of the CPU (clock gating?) such that the actual frequency does not matter.
At full load (I use cpuburn to jog as many FUs simultaneously as possible) it looks like each additional MHz requires ~3 mW.
So it would appear that an on-demand governor might not help to save power.
IOW, what's so special about how on-demand will behave in your case ? If it doesn't work properly, then that's the same for everybody, isn't it ?
Quoted 6 lines
Quoted 1 line
Why do you say so ?
Here's my (possibly incorrect) reasoning:
If the CPU is idle, kernel calls WFI and frequency apparently doesn't matter.
Right.
Quoted 2 lines
If the CPU has work to do, the on-demand governor will bump the frequency to the max (I think).
Not always, but it will choose the best frequency based on the load.
Quoted 2 lines
I don't think the CPU spends a lot of time in the intermediate frequencies (neither max nor min).
It does, it was fixed somewhere in v3.* .
Quoted 1 line
But maybe my logic is flawed?
Yes.
Quoted 4 lines
Also, some users (of our older kernel) reported problems were they considered the on-demand governor was "too slow" to ramp the frequency up. (But I don't know if they'd played with the configuration knobs.)
Shouldn't be the case anymore, or maybe those guys are more in favor of the interactive governor :)
Signature · 1 line
viresh