summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2015-11-19 18:25:17 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:40 -0700
commitd2d5734feca085b4886476ac5f3d6da7ec40ca8e (patch)
treee54c0c7e42059bddeb75db6c1fe1f68e56f5efdd /kernel
parent516b19042cd88cfd28bb053ebf33e02bc65c98ad (diff)
sched: Update min/max capacity for the CPUFREQ_CREATE_POLICY notifier
Following the change "57e2905 sched: Skip resetting HMP stats when max frequencies remain unchanged" the scheduler fails to update min/max capacities appropriately when CPUs are hot added after being hot removed. Fix this problem by handling the CPUFREQ_CREATE_POLICY notification and explicitly updating min/max capacities. Change-Id: I5dadac3258e18897fa3d505cf128ebe24c091efa Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 52e84a87b9eb..06e343bde6b5 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2730,10 +2730,11 @@ static int cpufreq_notifier_policy(struct notifier_block *nb,
/* Initialized to policy->max in case policy->related_cpus is empty! */
unsigned int orig_max_freq = policy->max;
- if (val != CPUFREQ_NOTIFY && val != CPUFREQ_REMOVE_POLICY)
+ if (val != CPUFREQ_NOTIFY && val != CPUFREQ_REMOVE_POLICY &&
+ val != CPUFREQ_CREATE_POLICY)
return 0;
- if (val == CPUFREQ_REMOVE_POLICY) {
+ if (val == CPUFREQ_REMOVE_POLICY || val == CPUFREQ_CREATE_POLICY) {
update_min_max_capacity();
return 0;
}