summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@codeaurora.org>2014-11-04 15:25:50 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:00:59 -0700
commitb2e57842c0c566fe2a45d32eacc3ba41f64c3e2a (patch)
tree86d6d83b70dd90cf8178210d32de6325e9889c63 /include/linux
parent33af11b6f4238f34860e305cf7610021ea8036b4 (diff)
sched: per-cpu mostly_idle threshold
sched_mostly_idle_load and sched_mostly_idle_nr_run knobs help pack tasks on cpus to some extent. In some cases, it may be desirable to have different packing limits for different cpus. For example, pack to a higher limit on high-performance cpus compared to power-efficient cpus. This patch removes the global mostly_idle tunables and makes them per-cpu, thus letting task packing behavior to be controlled in a fine-grained manner. Change-Id: Ifc254cda34b928eae9d6c342ce4c0f64e531e6c2 Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h6
-rw-r--r--include/linux/sched/sysctl.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 740696b0a57d..701611dad0fd 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2327,9 +2327,15 @@ sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency)
#endif
#ifdef CONFIG_SCHED_HMP
+
extern int sched_set_boost(int enable);
extern int sched_set_init_task_load(struct task_struct *p, int init_load_pct);
extern u32 sched_get_init_task_load(struct task_struct *p);
+extern int sched_set_cpu_mostly_idle_load(int cpu, int mostly_idle_pct);
+extern int sched_get_cpu_mostly_idle_load(int cpu);
+extern int sched_set_cpu_mostly_idle_nr_run(int cpu, int nr_run);
+extern int sched_get_cpu_mostly_idle_nr_run(int cpu);
+
#else
static inline int sched_set_boost(int enable)
{
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 8cadba92aee0..bd2abda891cd 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -59,9 +59,7 @@ extern int sysctl_sched_freq_dec_notify;
#ifdef CONFIG_SCHED_HMP
extern unsigned int sysctl_sched_spill_nr_run;
-extern unsigned int sysctl_sched_mostly_idle_nr_run;
extern unsigned int sysctl_sched_spill_load_pct;
-extern unsigned int sysctl_sched_mostly_idle_load_pct;
extern unsigned int sysctl_sched_small_task_pct;
extern unsigned int sysctl_sched_upmigrate_pct;
extern unsigned int sysctl_sched_downmigrate_pct;