land: rootdir: Refactor post-boot power configuration
This makes it such that we can be more versatile in applying our power configuration (recovery, different init triggers, etc.) This will not be included in init.qcom.rc until this is verified. Change-Id: I3a721ee8f31129f80662c752c370e951a4f80c38
This commit is contained in:
parent
b227feb407
commit
63b61111e2
3 changed files with 135 additions and 1 deletions
|
@ -4,7 +4,8 @@ PRODUCT_COPY_FILES += \
|
||||||
|
|
||||||
# Init scripts
|
# Init scripts
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
init.qcom.post_boot.sh
|
init.qcom.post_boot.sh \
|
||||||
|
init.qcom.power.rc
|
||||||
|
|
||||||
# Properties
|
# Properties
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
|
|
|
@ -10,6 +10,14 @@ LOCAL_SRC_FILES := fstab.qcom
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.qcom.power.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := init.qcom.power.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.qcom.rc
|
LOCAL_MODULE := init.qcom.rc
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
|
|
125
rootdir/init.qcom.power.rc
Normal file
125
rootdir/init.qcom.power.rc
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
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
|
Loading…
Reference in a new issue