summaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorSteve Muckle <smuckle@codeaurora.org>2012-10-24 15:00:20 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 19:58:30 -0700
commit03ab01a3188298458429595364146fc01eff2786 (patch)
tree9a010c31ad8da34e65a7a562f67b5b4fb12a06b7 /kernel/sysctl.c
parentcc06d4a91d964d9263ab0b9b18e9fa8679ecb4c1 (diff)
sched: add sysctl for controlling task migrations on wake
The PF_WAKE_UP_IDLE per-task flag made it impossible to enable the old behavior of SD_SHARE_PKG_RESOURCES, where every task migrates to an idle CPU on wakeup. The sched_wake_to_idle sysctl value, when made nonzero, will cause all tasks to migrate to an idle CPU if one is available when the task is woken up. This is regardless of how PF_WAKE_UP_IDLE is configured for tasks in the system. Similar to PF_WAKE_UP_IDLE, the SD_SHARE_PKG_RESOURCES scheduler domain flag must be enabled for the sysctl value to have an effect. Change-Id: I23bed846d26502c7aed600bfcf1c13053a7e5f61 Signed-off-by: Steve Muckle <smuckle@codeaurora.org> (cherry picked from commit 9d5b38dc0025d19df5b756b16024b4269e73f282)
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 53fa75661ae4..a633cbf026f9 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -285,6 +285,13 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
+ {
+ .procname = "sched_wake_to_idle",
+ .data = &sysctl_sched_wake_to_idle,
+ .maxlen = sizeof(unsigned int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
#ifdef CONFIG_SCHED_DEBUG
{
.procname = "sched_min_granularity_ns",