mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: use interactive governor by default
Co-authored-by: fcuzzocrea <bosconovic@gmail.com> Change-Id: I478e141ff08125390b6f97bba524a7871bae3497
This commit is contained in:
parent
87c911c2f8
commit
3f9e5e4c81
2 changed files with 52 additions and 30 deletions
|
@ -33,52 +33,72 @@ on init
|
|||
# HMP Task packing settings for 8226
|
||||
write /proc/sys/kernel/sched_small_task 50
|
||||
|
||||
# disable thermal core_control to update governor settings
|
||||
write /sys/module/msm_thermal/core_control/enabled 0
|
||||
|
||||
# Switch to ondemand gonvernor
|
||||
write /sys/devices/system/cpu/cpu0/online 1
|
||||
# Configure the hardware properly
|
||||
write /sys/module/lpm_levels/enable_low_power/l2 4
|
||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 11
|
||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand"
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 85
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 2
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 10
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core 70
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core 10
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq 787200
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/sync_freq 300000
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/step_up_early_hispeed 998400
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/step_up_interim_hispeed 1094400
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load 80
|
||||
write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/retention/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/retention/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/retention/suspend_enabled 1
|
||||
|
||||
# disable thermal core_control to update governor settings
|
||||
write /sys/module/msm_thermal/core_control/enabled 0
|
||||
|
||||
# Bring all CPUs online, and set node permissions
|
||||
write /sys/devices/system/cpu/cpu1/online 1
|
||||
write /sys/devices/system/cpu/cpu2/online 1
|
||||
write /sys/devices/system/cpu/cpu3/online 1
|
||||
chmod 664 /sys/devices/system/cpu/cpu1/online
|
||||
chmod 664 /sys/devices/system/cpu/cpu2/online
|
||||
chmod 664 /sys/devices/system/cpu/cpu3/online
|
||||
chown root system /sys/devices/system/cpu/cpu1/online
|
||||
chown root system /sys/devices/system/cpu/cpu2/online
|
||||
chown root system /sys/devices/system/cpu/cpu3/online
|
||||
|
||||
# Switch to interactive gonvernor and configure it
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
|
||||
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
|
||||
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
|
||||
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "25000 109440:50000"
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1094400
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/target_loads "70 998400:80 1094400:90"
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 50000
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000
|
||||
write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 50000
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 787200
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_early_factor 1
|
||||
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_interim_factor 1
|
||||
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 787200
|
||||
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 787200
|
||||
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 787200
|
||||
|
||||
# enable thermal core_control now
|
||||
write /sys/module/msm_thermal/core_control/enabled 1
|
||||
|
||||
# bring all CPUs 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
|
||||
|
||||
# Enable low power modes
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
||||
write /sys/module/lpm_levels/enable_low_power/l2 4
|
||||
# Configure the cpu-boost module
|
||||
write /sys/module/cpu_boost/parameters/boost_ms 20
|
||||
write /sys/module/cpu_boost/parameters/sync_threshold 998000
|
||||
write /sys/module/cpu_boost/parameters/input_boost_freq 1094400
|
||||
write /sys/module/cpu_boost/parameters/input_boost_ms 40
|
||||
|
||||
# Set RPS mask
|
||||
write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 2
|
||||
|
|
|
@ -388,6 +388,8 @@ on boot
|
|||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
||||
|
|
Loading…
Reference in a new issue