From d2d5734feca085b4886476ac5f3d6da7ec40ca8e Mon Sep 17 00:00:00 2001 From: Syed Rameez Mustafa Date: Thu, 19 Nov 2015 18:25:17 -0800 Subject: 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 --- kernel/sched/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel') 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; } -- cgit v1.2.3