diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-05-11 16:50:40 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-05-11 16:50:40 -0700 |
commit | d109c1ac070c962c4332015d06a008345a44a02c (patch) | |
tree | ae241eb2c079ae1b2ccb02a803f6aa7b38f40b9f /drivers/cpufreq | |
parent | 9a59ceb84312843046362a3503120ec6f70e56c5 (diff) | |
parent | bf3015849c3e9e7befda3f877e7646756b5925ee (diff) |
Merge branch 'linaro-android-3.14-lsk' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-v3.14-androidlsk-v3.14-15.05-android
* 'linaro-android-3.14-lsk' of git://android.git.linaro.org/kernel/linaro-android:
nf: IDLETIMER: Fix broken uid field in the msg
ipv4: Missing sk_nulls_node_init() in ping_unhash().
cpufreq: interactive: Round up timer_rate to match jiffy
cpufreq: interactive: Don't set floor_validate_time during boost
SELinux: ss: Fix policy write for ioctl operations
nf: IDLETIMER: Adds the uid field in the msg
android: configs: Enable SELinux and its dependencies.
SELinux: use deletion-safe iterator to free list
subsystem: CPU FREQUENCY DRIVERS- Set cpu_load calculation on current frequency
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_interactive.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 6b3facdf5ba2..b84f709c760e 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -363,7 +363,7 @@ static void cpufreq_interactive_timer(unsigned long data) spin_lock_irqsave(&pcpu->target_freq_lock, flags); do_div(cputime_speedadj, delta_time); loadadjfreq = (unsigned int)cputime_speedadj * 100; - cpu_load = loadadjfreq / pcpu->target_freq; + cpu_load = loadadjfreq / pcpu->policy->cur; tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime; if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) { @@ -609,14 +609,6 @@ static void cpufreq_interactive_boost(struct cpufreq_interactive_tunables *tunab ktime_to_us(ktime_get()); anyboost = 1; } - - /* - * Set floor freq and (re)start timer for when last - * validated. - */ - - pcpu->floor_freq = tunables->hispeed_freq; - pcpu->floor_validate_time = ktime_to_us(ktime_get()); spin_unlock_irqrestore(&pcpu->target_freq_lock, flags[1]); } @@ -863,12 +855,18 @@ static ssize_t store_timer_rate(struct cpufreq_interactive_tunables *tunables, const char *buf, size_t count) { int ret; - unsigned long val; + unsigned long val, val_round; ret = strict_strtoul(buf, 0, &val); if (ret < 0) return ret; - tunables->timer_rate = val; + + val_round = jiffies_to_usecs(usecs_to_jiffies(val)); + if (val != val_round) + pr_warn("timer_rate not aligned to jiffy. Rounded up to %lu\n", + val_round); + + tunables->timer_rate = val_round; return count; } |