50 lines
2.1 KiB
Plaintext
50 lines
2.1 KiB
Plaintext
on init
|
|
copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks
|
|
|
|
# Migrate tasks again in case kernel threads are created during boot
|
|
on property:sys.boot_completed=1
|
|
copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks
|
|
|
|
on property:vendor.post_boot.parsed=1
|
|
|
|
# IRQ Tuning
|
|
# IRQ 70: msm_drm0
|
|
# IRQ 222: kgsl_3d0_irq
|
|
write /proc/irq/70/smp_affinity_list 2
|
|
write /proc/irq/222/smp_affinity_list 1
|
|
|
|
# CPU Boost
|
|
write /sys/devices/system/cpu/cpu_boost/input_boost_ms 200
|
|
write /sys/devices/system/cpu/cpu_boost/input_boost_freq "0:1651200 1:1651200 2:1651200 3:1651200 4:1651200 5:1651200 6:1651200 7:1862400"
|
|
write /sys/devices/system/cpu/cpu_boost/sched_boost_on_input 2
|
|
|
|
# CPUFreq
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500
|
|
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/up_rate_limit_us 500
|
|
write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/down_rate_limit_us 20000
|
|
write /sys/devices/system/cpu/cpu7/cpufreq/schedutil/up_rate_limit_us 500
|
|
write /sys/devices/system/cpu/cpu7/cpufreq/schedutil/down_rate_limit_us 20000
|
|
|
|
# CPUSets
|
|
write /dev/cpuset/background/cpus 0-1
|
|
setprop dalvik.vm.dex2oat-cpu-set 0,1,2,3,4,5,6
|
|
setprop dalvik.vm.dex2oat-threads 6
|
|
|
|
# Configure uclamp
|
|
write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 1
|
|
write /dev/cpuctl/background/cpu.uclamp.max 50
|
|
write /dev/cpuctl/system-background/cpu.uclamp.max 50
|
|
write /dev/cpuctl/dex2oat/cpu.uclamp.max 60
|
|
# Setup cpu.shares to throttle background groups (bg ~ 5% sysbg ~ 5% dex2oat ~2.5%)
|
|
write /dev/cpuctl/background/cpu.shares 1024
|
|
write /dev/cpuctl/system-background/cpu.shares 1024
|
|
write /dev/cpuctl/dex2oat/cpu.shares 512
|
|
write /dev/cpuctl/system/cpu.shares 20480
|
|
# We only have system and background groups holding tasks and the groups below are empty
|
|
write /dev/cpuctl/camera-daemon/cpu.shares 20480
|
|
write /dev/cpuctl/foreground/cpu.shares 20480
|
|
write /dev/cpuctl/nnapi-hal/cpu.shares 20480
|
|
write /dev/cpuctl/rt/cpu.shares 20480
|
|
write /dev/cpuctl/top-app/cpu.shares 20480
|