]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00215955 cpufreq interactive mx6: set cpufreq lowest point if cpu idling
authorRobin Gong <B38343@freescale.com>
Fri, 6 Jul 2012 05:07:25 +0000 (13:07 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:20 +0000 (14:12 +0200)
commit8cefd87ffecd40ef7dd72ca5081d74984ce0d94d
treed54c28e33826ad7c4a7b3c4d3b8c13e7b73d2a67
parent4a40f5e46f2190f1250f7d41bc3d061c696fcb91
ENGR00215955 cpufreq interactive mx6: set cpufreq lowest point if cpu idling

Consider the below scenario:  there is one CPU enter idle state before
switch happen, and the CPU frequency is set on high point(1G with userspace
cpufreq profile). After cpufreq profile is switched to interactive, all of the
cpus's target_freq will be set to the current CPU frequency  1G. Then after one
sample window, interactive profile will revalue the current cpu loading in
every cpu(except idle cpu), and get the desired frequency and compared with
target_freq to decide up or down frequency.  Until all of cpus's target_freq
is lower than desired frequency , down frequency will happen. But the idle
CPU's frequency has been set on 1G , so cpu frequency miss the chance to set
lower cpu frequency , although there is no loading in all of cpus.CPU frequency
will be down unless the idled CPU exit idle to revalue cpu loading and get the
right target_freq, in the worst case, it will never happen.

Now we can do this:
If we judge cpu idle state and set taget_freq to lowest frequency when switch
to interactive, then CPU frequency modify will never be blocked on idled CPU.
Signed-off-by: Robin Gong <B38343@freescale.com>
drivers/cpufreq/cpufreq_interactive.c