summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorRiley Andrews <riandrews@google.com>2015-07-20 16:01:48 -0700
committerRom Lemarchand <romlem@google.com>2015-07-21 19:49:45 +0000
commite850f5786cdd4d3e4f1157db8785de3e6ff77eab (patch)
tree827c57e5934426277af9bbb6e3635facafce81db /rootdir
parent5271b5edeb8613c74d7d7df91c1fd2ac0dbabf5b (diff)
downloadsystem_core-e850f5786cdd4d3e4f1157db8785de3e6ff77eab.zip
system_core-e850f5786cdd4d3e4f1157db8785de3e6ff77eab.tar.gz
system_core-e850f5786cdd4d3e4f1157db8785de3e6ff77eab.tar.bz2
Disable scaling of the cfs tunables.
The cfs tunables auto-scale with the number of active cpus by default. Given that the tunable settings are in device-independent code and it's not known how many cores are currently active when the init.rc file runs, the cfs tunables can vary pretty significantly across devices depending on the state at boot. Disable scaling of the the tunables so that we can get more consistent behavior of cfs across devices. If we want to do per-device tuning of these values, we can override what's written here in device specific files. Bug: 22634118 Change-Id: Id19b24ef819fef762521e75af55e6d4378cfc949
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/init.rc7
1 files changed, 7 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 4e23354..0ac6698 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -87,10 +87,17 @@ on init
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
+
+ # scheduler tunables
+ # Disable auto-scaling of scheduler tunables with hotplug. The tunables
+ # will vary across devices in unpredictable ways if allowed to scale with
+ # cpu cores.
+ write /proc/sys/kernel/sched_tunable_scaling 0
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
+
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/kernel/kptr_restrict 2
write /proc/sys/vm/mmap_min_addr 32768