2016-11-04 23:58:05 +00:00
|
|
|
on boot
|
2015-09-08 08:53:02 +00:00
|
|
|
|
|
|
|
# Set RPS mask
|
|
|
|
write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 2
|
|
|
|
|
2017-07-25 14:10:28 +00:00
|
|
|
# Update foreground and background cpusets
|
|
|
|
write /dev/cpuset/foreground/cpus 0-7
|
|
|
|
write /dev/cpuset/foreground/boost/cpus 0-3
|
|
|
|
write /dev/cpuset/background/cpus 4-5
|
|
|
|
write /dev/cpuset/system-background/cpus 4-7
|
|
|
|
|
2016-11-03 06:49:36 +00:00
|
|
|
on enable-low-power
|
2016-10-31 00:51:53 +00:00
|
|
|
# HMP scheduler settings
|
|
|
|
write /proc/sys/kernel/sched_window_stats_policy 3
|
|
|
|
write /proc/sys/kernel/sched_ravg_hist_size 3
|
2017-07-25 14:10:28 +00:00
|
|
|
write /proc/sys/kernel/sched_ravg_window 20000000
|
|
|
|
|
|
|
|
#disable sched_boost in 8937
|
|
|
|
write /proc/sys/kernel/sched_boost 0
|
2016-10-31 00:51:53 +00:00
|
|
|
|
|
|
|
# HMP Task packing settings
|
|
|
|
write /proc/sys/kernel/sched_small_task 20
|
|
|
|
write /sys/devices/system/cpu/cpu0/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu1/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu2/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu3/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu4/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu5/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu6/sched_mostly_idle_load 30
|
|
|
|
write /sys/devices/system/cpu/cpu7/sched_mostly_idle_load 30
|
|
|
|
|
|
|
|
write /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run 3
|
|
|
|
write /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run 3
|
|
|
|
|
|
|
|
write /sys/devices/system/cpu/cpu0/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu1/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu2/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu3/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu4/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu5/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu6/sched_prefer_idle 0
|
|
|
|
write /sys/devices/system/cpu/cpu7/sched_prefer_idle 0
|
|
|
|
|
|
|
|
write /sys/class/devfreq/soc:qcom,cpubw/governor bw_hwmon
|
|
|
|
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent 20
|
|
|
|
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps 30
|
|
|
|
|
|
|
|
# Disable thermal core_control to update interactive gov settings
|
|
|
|
write /sys/module/msm_thermal/core_control/enabled 0
|
|
|
|
|
|
|
|
# Enable governor for perf cluster
|
|
|
|
write /sys/devices/system/cpu/cpu0/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay "19000 1094400:39000"
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load 85
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate 20000
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq 1094400
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy 0
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads "1 960000:85 1094400:90 1344000:80"
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time 40000
|
2017-07-25 14:10:28 +00:00
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor 40000
|
2016-10-31 00:51:53 +00:00
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 960000
|
|
|
|
|
|
|
|
# Enable governor for power cluster
|
|
|
|
write /sys/devices/system/cpu/cpu4/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor interactive
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay 39000
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load 90
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate 20000
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq 768000
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy 0
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads "1 768000:90"
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time 40000
|
2017-07-25 14:10:28 +00:00
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor 40000
|
2016-10-31 00:51:53 +00:00
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 768000
|
|
|
|
|
2017-07-25 14:10:28 +00:00
|
|
|
# Disable L2-GDHS low power modes
|
|
|
|
write /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled N
|
|
|
|
write /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled N
|
|
|
|
write /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled N
|
|
|
|
write /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled N
|
2016-10-31 00:51:53 +00:00
|
|
|
|
|
|
|
# Bring all cores online
|
|
|
|
write /sys/devices/system/cpu/cpu1/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu2/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu3/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu4/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu5/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu6/online 1
|
|
|
|
write /sys/devices/system/cpu/cpu7/online 1
|
|
|
|
|
2017-07-23 10:34:16 +00:00
|
|
|
# Enable power_efficient workqueue
|
|
|
|
write /sys/module/workqueue/parameters/power_efficient 1
|
|
|
|
|
2016-10-31 00:51:53 +00:00
|
|
|
# Enable low power modes
|
|
|
|
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
|
|
|
|
|
|
|
# HMP scheduler (big.Little cluster related) settings
|
|
|
|
write /proc/sys/kernel/sched_upmigrate 93
|
|
|
|
write /proc/sys/kernel/sched_downmigrate 83
|
|
|
|
|
|
|
|
# Enable sched guided freq control
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load 1
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif 1
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load 1
|
|
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif 1
|
|
|
|
write /proc/sys/kernel/sched_freq_inc_notify 50000
|
|
|
|
write /proc/sys/kernel/sched_freq_dec_notify 50000
|
|
|
|
|
2017-07-25 14:10:28 +00:00
|
|
|
# Enable dynamic clock gating
|
|
|
|
write /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating 1
|
|
|
|
|
|
|
|
# Enable timer migration to little cluster
|
|
|
|
write /proc/sys/kernel/power_aware_timer_migration 1
|
|
|
|
|
2016-10-31 00:51:53 +00:00
|
|
|
# Set per_process_reclaim tuning parameters
|
|
|
|
write /sys/module/process_reclaim/parameters/enable_process_reclaim 1
|
|
|
|
write /sys/module/process_reclaim/parameters/pressure_max 70
|
|
|
|
write /sys/module/process_reclaim/parameters/swap_opt_eff 30
|
2017-07-25 14:10:28 +00:00
|
|
|
write /sys/module/process_reclaim/parameters/pressure_min 50
|
|
|
|
write /sys/module/process_reclaim/parameters/per_swap_size 512
|
|
|
|
|
|
|
|
# Set lowmemorykiller tuning parameters
|
|
|
|
write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1
|
|
|
|
write /sys/module/lowmemorykiller/parameters/minfree "15360,19200,23040,26880,34415,43737"
|
|
|
|
write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 53059
|
2016-10-31 00:51:53 +00:00
|
|
|
|
|
|
|
# Set ZCache parameters
|
|
|
|
write /sys/module/zcache/parameters/clear_percent 3
|
|
|
|
write /sys/module/zcache/parameters/max_pool_percent 30
|
|
|
|
|
|
|
|
write /sys/block/mmcblk0/bdi/read_ahead_kb 128
|
|
|
|
write /sys/block/mmcblk0/queue/read_ahead_kb 128
|
|
|
|
write /sys/block/dm-0/queue/read_ahead_kb 128
|
|
|
|
write /sys/block/dm-1/queue/read_ahead_kb 128
|
|
|
|
|
|
|
|
rm /data/system/perfd/default_values
|
|
|
|
start perfd
|
2016-11-01 06:13:59 +00:00
|
|
|
|
2016-11-10 22:51:47 +00:00
|
|
|
on class_start:late_start
|
2016-11-03 06:49:36 +00:00
|
|
|
trigger enable-low-power
|
|
|
|
|
|
|
|
on charger
|
2016-11-10 22:59:46 +00:00
|
|
|
# Offline all cores other than CPU0
|
|
|
|
write /sys/devices/system/cpu/cpu1/online 0
|
|
|
|
write /sys/devices/system/cpu/cpu2/online 0
|
|
|
|
write /sys/devices/system/cpu/cpu3/online 0
|
|
|
|
write /sys/devices/system/cpu/cpu4/online 0
|
|
|
|
write /sys/devices/system/cpu/cpu5/online 0
|
|
|
|
write /sys/devices/system/cpu/cpu6/online 0
|
|
|
|
write /sys/devices/system/cpu/cpu7/online 0
|
|
|
|
|
|
|
|
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
|
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
|
2016-11-10 22:57:07 +00:00
|
|
|
|
|
|
|
on property:init.svc.recovery=running
|
|
|
|
trigger enable-low-power
|
2017-01-02 08:49:31 +00:00
|
|
|
|
|
|
|
on property:dev.bootcomplete=1
|
|
|
|
setprop sys.io.scheduler bfq
|