diff mbox series

[3/3] cpufreq: qcom-hw: Set CPU affinity of dcvsh interrupts

Message ID 20211111154808.2024808-4-vladimir.zapolskiy@linaro.org (mailing list archive)
State New, archived
Delegated to: viresh kumar
Headers show
Series cpufreq: qcom-hw: a few fixes in qcom cpufreq driver | expand

Commit Message

Vladimir Zapolskiy Nov. 11, 2021, 3:48 p.m. UTC
In runtime CPU cluster specific dcvsh interrupts may be handled on
unrelated CPU cores, it leads to an issue of too excessive number of
received and handled interrupts, but this is not observed, if CPU
affinity of the interrupt handler is set in accordance to CPU clusters.

The change reduces a number of received interrupts in about 10-100 times.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
---
 drivers/cpufreq/qcom-cpufreq-hw.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Matthias Kaehlcke Nov. 11, 2021, 4:32 p.m. UTC | #1
On Thu, Nov 11, 2021 at 05:48:08PM +0200, Vladimir Zapolskiy wrote:
> In runtime CPU cluster specific dcvsh interrupts may be handled on
> unrelated CPU cores, it leads to an issue of too excessive number of
> received and handled interrupts, but this is not observed, if CPU
> affinity of the interrupt handler is set in accordance to CPU clusters.
> 
> The change reduces a number of received interrupts in about 10-100 times.
> 
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
diff mbox series

Patch

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 5d55217caa8b..3967191836fb 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -400,6 +400,11 @@  static int qcom_cpufreq_hw_lmh_init(struct cpufreq_policy *policy, int index)
 		return 0;
 	}
 
+	ret = irq_set_affinity_hint(data->throttle_irq, policy->cpus);
+	if (ret)
+		dev_err(&pdev->dev, "Failed to set CPU affinity of %s[%d]\n",
+			data->irq_name, data->throttle_irq);
+
 	return 0;
 }