[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8533207.T7Z3S40VBb@rjwysocki.net>
Date: Mon, 14 Apr 2025 22:41:32 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Mario Limonciello <mario.limonciello@....com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Christian Loehle <christian.loehle@....com>,
Sultan Alsawaf <sultan@...neltoast.com>,
Peter Zijlstra <peterz@...radead.org>,
Valentin Schneider <vschneid@...hat.com>, Ingo Molnar <mingo@...hat.com>
Subject:
[PATCH v1 1/5] cpufreq/sched: Check fast_switch_enabled when setting
need_freq_update
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Commit 8e461a1cb43d ("cpufreq: schedutil: Fix superfluous updates caused
by need_freq_update") overlooked the fact that when fast swtching is
enabled, it is the only way to pick up new policy limits and so
need_freq_update needs to be set in that case when limits_changed is
set.
This causes policy limits updates to be missed in some cases, so
make sugov_should_update_freq() also set need_freq_update when the
fast_switch_enabled policy flag is set.
Fixes: 8e461a1cb43d ("cpufreq: schedutil: Fix superfluous updates caused by need_freq_update")
Closes: https://lore.kernel.org/lkml/Z_Tlc6Qs-tYpxWYb@linaro.org/
Reported-by: Stephan Gerhold <stephan.gerhold@...aro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
kernel/sched/cpufreq_schedutil.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -83,7 +83,9 @@
if (unlikely(sg_policy->limits_changed)) {
sg_policy->limits_changed = false;
- sg_policy->need_freq_update = cpufreq_driver_test_flags(CPUFREQ_NEED_UPDATE_LIMITS);
+ sg_policy->need_freq_update =
+ sg_policy->policy->fast_switch_enabled ||
+ cpufreq_driver_test_flags(CPUFREQ_NEED_UPDATE_LIMITS);
return true;
}
Powered by blists - more mailing lists