android_device_lenovo_msm89.../rootdir/init.qcom.power.rc
Zhao Wei Liew 148b670d9a land: Enable zRAM
Change-Id: I6edebe7668195de8bcb52cf7fe8fc807e083b247
2016-11-01 14:13:59 +08:00

128 lines
6.4 KiB
Text

on property:sys.boot_completed=1
# HMP scheduler settings
write /proc/sys/kernel/sched_window_stats_policy 3
write /proc/sys/kernel/sched_ravg_hist_size 3
# 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
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
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 768000
# Re-enable thermal core_control
write /sys/module/msm_thermal/core_control/enabled 1
# 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
# 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
# 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
# Enable core control
insmod /system/lib/modules/core_ctl.ko
write /sys/devices/system/cpu/cpu0/core_ctl/min_cpus 2
write /sys/devices/system/cpu/cpu0/core_ctl/max_cpus 4
write /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres 68
write /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres 40
write /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms 100
write /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster 1
# 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
write /sys/module/process_reclaim/parameters/pressure_min 10
write /sys/module/process_reclaim/parameters/per_swap_size 1024
# 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
swapon_all fstab.qcom
write /proc/sys/vm/swappiness 100