mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-29 23:19:52 +00:00
This CL will save 100ms towards system_server_ready and 200ms towards BootComplete, and also reduces the fluctuation per experiment. - Enable powersaving in charger mode - Enable bus-dcvs in boot_complete but not during boot - Start perfd after init.power.sh completes - Enable powerhint after perfd is started Before starting_zygote : 3.4446 0.24937 nonencrypted : 3.678 0.23805 SystemServer_start : 4.8719 0.25874 SystemUi_start : 6.3992 0.36695 system_server_ready : 6.7353 0.34765 BootAnimStopRequest : 7.5966 0.3806 BootAnimEnd : 9.5259 0.399 BootComplete : 9.6221 0.42225 After: starting_zygote : 3.4261 0.22712 nonencrypted : 3.665 0.22334 SystemServer_start : 4.8406 0.23445 SystemUi_start : 6.2765 0.23754 system_server_ready : 6.6392 0.23679 BootAnimStopRequest : 7.7449 0.25752 BootAnimEnd : 9.2631 0.43299 BootComplete : 9.409 0.44021 Bug: 63644084 Test: 10 boot with packages/services/Car/tools/bootanalyze/bootanalyze.py Change-Id: I975974dedea0cce23f74f15d842e7308e9797868
54 lines
1.6 KiB
Bash
Executable File
54 lines
1.6 KiB
Bash
Executable File
#! /vendor/bin/sh
|
|
|
|
################################################################################
|
|
# helper functions to allow Android init like script
|
|
|
|
function write() {
|
|
echo -n $2 > $1
|
|
}
|
|
|
|
function copy() {
|
|
cat $1 > $2
|
|
}
|
|
|
|
################################################################################
|
|
|
|
# Enable bus-dcvs
|
|
for cpubw in /sys/class/devfreq/*qcom,cpubw*
|
|
do
|
|
write $cpubw/governor "bw_hwmon"
|
|
write $cpubw/polling_interval 50
|
|
write $cpubw/min_freq 1525
|
|
write $cpubw/bw_hwmon/mbps_zones "3143 5859 11863 13763"
|
|
write $cpubw/bw_hwmon/sample_ms 4
|
|
write $cpubw/bw_hwmon/io_percent 34
|
|
write $cpubw/bw_hwmon/hist_memory 20
|
|
write $cpubw/bw_hwmon/hyst_length 10
|
|
write $cpubw/bw_hwmon/low_power_ceil_mbps 0
|
|
write $cpubw/bw_hwmon/low_power_io_percent 34
|
|
write $cpubw/bw_hwmon/low_power_delay 20
|
|
write $cpubw/bw_hwmon/guard_band_mbps 0
|
|
write $cpubw/bw_hwmon/up_scale 250
|
|
write $cpubw/bw_hwmon/idle_mbps 1600
|
|
done
|
|
|
|
write /sys/class/devfreq/soc:qcom,mincpubw/governor "cpufreq"
|
|
|
|
# Enable memlat governor
|
|
for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
|
|
do
|
|
write $memlat/governor "mem_latency"
|
|
write $memlat/polling_interval 10
|
|
write $memlat/mem_latency/ratio_ceil 400
|
|
done
|
|
|
|
# Signal perfd that boot has completed
|
|
setprop sys.post_boot.parsed 1
|
|
|
|
# On debuggable builds, enable console_suspend if uart is enabled to save power
|
|
# Otherwise, disable console_suspend to get better logging for kernel crashes
|
|
if [[ $(getprop ro.debuggable) == "1" && ! -e /sys/class/tty/ttyMSM0 ]]
|
|
then
|
|
write /sys/module/printk/parameters/console_suspend N
|
|
fi
|