From 4996dafe6875f2804d525e6ac74162e3efc4cda3 Mon Sep 17 00:00:00 2001 From: Olav Haugan Date: Sat, 29 Aug 2015 11:03:37 -0700 Subject: sched/core: Add API to set cluster d-state Add new API to the scheduler to allow low power mode driver to inform the scheduler about the d-state of a cluster. This can be leveraged by the scheduler to make an informed decision about the cost of placing a task on a cluster. Change-Id: If0fe0fdba7acad1c2eb73654ebccfdb421225e62 Signed-off-by: Olav Haugan [joonwoop@codeaurora.org: omitted fixes for qhmp_core.c and qhmp_core.h] Signed-off-by: Joonwoo Park --- include/linux/sched.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/sched.h b/include/linux/sched.h index 941930f2935f..9e4171146f39 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2319,6 +2319,8 @@ extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask); extern void sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency); +extern void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, int dstate, + int wakeup_energy, int wakeup_latency); #else static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) @@ -2335,6 +2337,11 @@ static inline void sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency) { } + +static inline void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, + int dstate, int wakeup_energy, int wakeup_latency) +{ +} #endif extern int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle); -- cgit v1.2.3