Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24e26f1e authored by Syed Rameez Mustafa's avatar Syed Rameez Mustafa
Browse files

sched: Update min/max capacity for the CPUFREQ_CREATE_POLICY notifier



Following the change "57e29051 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: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
parent ec7db6c5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2733,10 +2733,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;
	}