summaryrefslogtreecommitdiff
path: root/include/linux/sched/topology.h
diff options
context:
space:
mode:
authorIonela Voinescu <ionela.voinescu@arm.com>2020-10-27 18:07:11 +0000
committerPeter Zijlstra <peterz@infradead.org>2020-11-19 11:25:47 +0100
commit31f6a8c0a471be7d7d05c93eac50fcb729e79b9d (patch)
tree75904defe592809ef90aa67fcf0558f9c8205524 /include/linux/sched/topology.h
parent480a6ca2dc6ed82c783faf7e4a9644769b8397d8 (diff)
sched/topology,schedutil: Wrap sched domains rebuild
Add the rebuild_sched_domains_energy() function to wrap the functionality that rebuilds the scheduling domains if any of the Energy Aware Scheduling (EAS) initialisation conditions change. This functionality is used when schedutil is added or removed or when EAS is enabled or disabled through the sched_energy_aware sysctl. Therefore, create a single function that is used in both these cases and that can be later reused. Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Quentin Perret <qperret@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lkml.kernel.org/r/20201027180713.7642-2-ionela.voinescu@arm.com
Diffstat (limited to 'include/linux/sched/topology.h')
-rw-r--r--include/linux/sched/topology.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 9ef7bf686a9f..8f0f778b7c91 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -225,6 +225,14 @@ static inline bool cpus_share_cache(int this_cpu, int that_cpu)
#endif /* !CONFIG_SMP */
+#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
+extern void rebuild_sched_domains_energy(void);
+#else
+static inline void rebuild_sched_domains_energy(void)
+{
+}
+#endif
+
#ifndef arch_scale_cpu_capacity
/**
* arch_scale_cpu_capacity - get the capacity scale factor of a given CPU.