summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2020-12-08 07:16:56 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-01-14 13:20:09 +0300
commita5418be9dffe70ccbb0b4bd5ea3881c81927e965 (patch)
treee78f950d1d4196ee0cf32451f27216f7e01a581c /include/linux/sched.h
parent7d6a905f3dd62c4502cdd772c71319de4058ec89 (diff)
downloadlinux-a5418be9dffe70ccbb0b4bd5ea3881c81927e965.tar.xz
sched/core: Rename schedutil_cpu_util() and allow rest of the kernel to use it
There is nothing schedutil specific in schedutil_cpu_util(), rename it to effective_cpu_util(). Also create and expose another wrapper sched_cpu_util() which can be used by other parts of the kernel, like thermal core (that will be done in a later commit). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lkml.kernel.org/r/db011961fb3bb8bef1c0eda5cd64564637d3ef31.1607400596.git.viresh.kumar@linaro.org
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6e3a5eeec509..31169e70476a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1968,6 +1968,11 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
#define TASK_SIZE_OF(tsk) TASK_SIZE
#endif
+#ifdef CONFIG_SMP
+/* Returns effective CPU energy utilization, as seen by the scheduler */
+unsigned long sched_cpu_util(int cpu, unsigned long max);
+#endif /* CONFIG_SMP */
+
#ifdef CONFIG_RSEQ
/*