mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpufreq: Rebuild sched-domains when removing cpufreq driver
@ 2023-09-18 11:29 Pierre Gondois
  2023-09-18 11:29 ` Pierre Gondois
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pierre Gondois @ 2023-09-18 11:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Shrikanth Hegde, vschneid, Pierre Gondois, Rafael J. Wysocki,
	Viresh Kumar, linux-pm

The Energy Aware Scheduler (EAS) relies on the schedutil governor.
When moving to/from the schedutil governor, sched domains must be
rebuilt to allow re-evaluating the enablement conditions of EAS.
This is done through sched_cpufreq_governor_change().

Having a cpufreq governor assumes having a cpufreq driver running.
Inserting/removing a cpufreq driver should trigger a re-evaluation
of EAS enablement conditions, avoiding to see EAS enabled when
removing a running cpufreq driver.

Add a sched_cpufreq_governor_change() call in cpufreq driver removal
path.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
 drivers/cpufreq/cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 60ed89000e82..0a4979c34fd1 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1673,6 +1673,8 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)
 		cpufreq_driver->exit(policy);
 		policy->freq_table = NULL;
 	}
+
+	sched_cpufreq_governor_change(policy, policy->governor);
 }
 
 static int cpufreq_offline(unsigned int cpu)
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-29  7:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-18 11:29 [PATCH] cpufreq: Rebuild sched-domains when removing cpufreq driver Pierre Gondois
2023-09-18 11:29 ` Pierre Gondois
2023-09-18 23:03 ` Dietmar Eggemann
2023-09-19  7:49   ` Pierre Gondois
2023-09-20  5:29     ` Shrikanth Hegde
2023-09-21 22:04       ` Dietmar Eggemann
2023-09-28  7:18 ` Viresh Kumar
2023-09-28 12:49   ` Pierre Gondois
2023-09-29  3:27     ` Viresh Kumar
2023-09-29  7:22       ` Pierre Gondois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®