summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJoonwoo Park <joonwoop@codeaurora.org>2016-12-20 15:23:53 -0800
committerJoel Fernandes <joelaf@google.com>2017-10-19 11:56:50 -0700
commit40c3aaa56a68455a1c8eccff1bb23d853d8e239c (patch)
tree55bf0b99c30aca12c018cdf88b5e23be96ad46e6 /kernel
parent7ab48e4c8d9e0652bd978f3df26c29e64b5ea85a (diff)
cpufreq: sched: update capacity request upon tick always
At present, sched_freq_tick() skips updating of capacity update when current frequency is fmax. This can cause incorrect frequency drop when a CPU bound task goes into sleep for example : 1) A task (A) enqueues onto CPU 0 and executes for long time. 2) A new task (B) which has low task demand enqueues onto CPU 1 and executes long so becomes a CPU bound task. 3) Both CPU 0 and 1 gets scheduler tick but skip sched_freq_tick() since current frequency is fmax. 4) Task (A) sleeps and lower the CPU 0's capacity request. 5) Because task (B) voted CPU capacity at step 2 with low demand and skipped to request afterwards, cluster frequency for both CPU 0 and 1 drops to match capacity voted by CPU 1 at step 2 even though task (B) on CPU 1 requires max capacity. Fix such incorrectness by not skipping CPU capacity voting at tick path. Change-Id: Ieb46af1ac96ffce7a5532c58c7f07bf1ada06b86 Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org> Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fec7b2c4f9fd..f747e373ed6f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3025,16 +3025,9 @@ static void sched_freq_tick_walt(int cpu)
static void sched_freq_tick(int cpu)
{
- unsigned long capacity_orig, capacity_curr;
-
if (!sched_freq())
return;
- capacity_orig = capacity_orig_of(cpu);
- capacity_curr = capacity_curr_of(cpu);
- if (capacity_curr == capacity_orig)
- return;
-
_sched_freq_tick(cpu);
}
#else