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

Commit 5d0b1a79 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Jonathan Avila
Browse files

cpufreq: schedutil: Ignore work_in_progress



Blindly ignoring frequency updates because of work_in_progress can leave
the CPUs at the wrong frequency for a long time. It's better to update the
frequency immediately than wait for a future event that might take a long
time to come. The irq_work code already ignores double queuing of work. So,
that part of the code is still safe when the work_in_progress flag is
ignored.

Change-Id: Id0b3711314dfbfa18b5f4bce30a239ee3cf962d6
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
Signed-off-by: default avatarRohit Gupta <rohgup@codeaurora.org>
[avilaj@codeaurora.org: Port to 4.19]
Signed-off-by: default avatarJonathan Avila <avilaj@codeaurora.org>
parent 031e0751
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -162,11 +162,9 @@ static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,
	if (!sugov_update_next_freq(sg_policy, time, next_freq))
		return;

	if (!sg_policy->work_in_progress) {
	sg_policy->work_in_progress = true;
	irq_work_queue(&sg_policy->irq_work);
}
}

/**
 * get_next_freq - Compute a new frequency for a given cpufreq policy.