summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJoonwoo Park <joonwoop@codeaurora.org>2015-08-31 17:21:35 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:43 -0700
commit07eb3f803b419bdebad45d846113dc069307be90 (patch)
tree845a39607dde5f403295b161cbd321ee4e4f3122 /include/linux
parentfd38bb103d3e0be4796dd9fa19c2d0c90c06cf6a (diff)
sched: select task's prev_cpu as the best CPU when it was chosen recently
Select given task's prev_cpu when the task slept for short period to reduce latency of task placement and migrations. A new tunable /proc/sys/kernel/sched_select_prev_cpu_us introduced to determine whether tasks are eligible to go through fast path. CRs-fixed: 947467 Change-Id: Ia507665b91f4e9f0e6ee1448d8df8994ead9739a [joonwoop@codeaurora.org: fixed conflict in include/linux/sched.h, include/linux/sched/sysctl.h, kernel/sched/core.c and kernel/sysctl.c] Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/sched/sysctl.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d5275982df22..2125f214f287 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1458,6 +1458,7 @@ struct task_struct {
*/
u32 init_load_pct;
u64 last_wake_ts;
+ u64 last_switch_out_ts;
#endif
#ifdef CONFIG_CGROUP_SCHED
struct task_group *sched_task_group;
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 0663cf3c7410..bfea9efef2e9 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -70,6 +70,7 @@ extern unsigned int sysctl_early_detection_duration;
extern unsigned int sysctl_sched_lowspill_freq;
extern unsigned int sysctl_sched_pack_freq;
extern unsigned int sysctl_sched_boost;
+extern unsigned int sysctl_sched_select_prev_cpu_us;
#if defined(CONFIG_SCHED_FREQ_INPUT)
extern unsigned int sysctl_sched_new_task_windows;
#endif