From 754f66613135c2b554051544dd9148ac83bb725e Mon Sep 17 00:00:00 2001 From: Syed Rameez Mustafa Date: Wed, 28 May 2014 13:30:26 -0700 Subject: sched/fair: Introduce scheduler boost for low latency workloads Certain low latency bursty workloads require immediate use of highest capacity CPUs in HMP systems. Existing load tracking mechanisms may be unable to respond to the sudden surge in the system load within the latency requirements. Introduce the scheduler boost feature for such workloads. While boost is in effect the scheduler bypasses regular load based task placement and prefers highest capacity CPUs in the system for all non-small fair sched class tasks. Provide both a kernel and userspace API for software that may have apriori knowledge about the system workload. Change-Id: I783f585d1f8c97219e629d9c54f712318821922f Signed-off-by: Syed Rameez Mustafa [joonwoop@codeaurora.org: fixed minor conflict in include/linux/sched/sysctl.h.] Signed-off-by: Joonwoo Park --- include/linux/sched.h | 9 +++++++++ include/linux/sched/sysctl.h | 4 ++++ 2 files changed, 13 insertions(+) (limited to 'include/linux') diff --git a/include/linux/sched.h b/include/linux/sched.h index 1fa6ff26f5f7..d4ac19e3bd39 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2300,6 +2300,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); +#else +static inline int sched_set_boost(int enable) +{ + return -EINVAL; +} +#endif + #ifdef CONFIG_NO_HZ_COMMON void calc_load_enter_idle(void); void calc_load_exit_idle(void); diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h index eaf153b35cfa..fde724969cd8 100644 --- a/include/linux/sched/sysctl.h +++ b/include/linux/sched/sysctl.h @@ -64,6 +64,7 @@ extern unsigned int sysctl_sched_downmigrate_pct; extern int sysctl_sched_upmigrate_min_nice; extern unsigned int sysctl_sched_enable_power_aware; extern unsigned int sysctl_sched_powerband_limit_pct; +extern unsigned int sysctl_sched_boost; #else /* CONFIG_SCHED_HMP */ @@ -101,6 +102,9 @@ extern int sched_migrate_notify_proc_handler(struct ctl_table *table, extern int sched_hmp_proc_update_handler(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos); +extern int sched_boost_handler(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos); + /* * control realtime throttling: * -- cgit v1.2.3