davinci: rootdir: Move simple writes from post_boot script to init.target.rc

Change-Id: I512689bbdd77b9a998e7a5d6a2ee91cede599f44
This commit is contained in:
Arian 2020-08-25 16:46:37 +02:00
parent bbe34cefca
commit fc27e74506
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9
2 changed files with 48 additions and 50 deletions

View File

@ -93,56 +93,6 @@ function configure_memory_parameters() {
case "$target" in case "$target" in
"sm6150") "sm6150")
# Apply settings for sm6150
# Set the default IRQ affinity to the silver cluster. When a
# CPU is isolated/hotplugged, the IRQ affinity is adjusted
# to one of the CPU from the default IRQ affinity mask.
echo 3f > /proc/irq/default_smp_affinity
# Core control parameters on silver
echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
# Setting b.L scheduler parameters
# default sched up and down migrate values are 71 and 65
echo 65 > /proc/sys/kernel/sched_downmigrate
echo 71 > /proc/sys/kernel/sched_upmigrate
# default sched up and down migrate values are 100 and 95
echo 85 > /proc/sys/kernel/sched_group_downmigrate
echo 100 > /proc/sys/kernel/sched_group_upmigrate
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
# colocation v3 settings
echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
# configure governor settings for little cluster
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
# configure governor settings for big cluster
echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
echo 1324600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
echo "0:0 1:0 2:0 3:0 4:1804800 5:0 6:0 7:2208000" > /sys/module/cpu_boost/parameters/powerkey_input_boost_freq
echo 400 > /sys/module/cpu_boost/parameters/powerkey_input_boost_ms
# Enable bus-dcvs # Enable bus-dcvs
for device in /sys/devices/platform/soc for device in /sys/devices/platform/soc
do do

View File

@ -88,6 +88,54 @@ on property:sys.boot_completed=1
write /dev/cpuset/background/cpus 0-7 write /dev/cpuset/background/cpus 0-7
write /dev/cpuset/system-background/cpus 0-7 write /dev/cpuset/system-background/cpus 0-7
# Apply settings for sm6150
# Set the default IRQ affinity to the silver cluster. When a
# CPU is isolated/hotplugged, the IRQ affinity is adjusted
# to one of the CPU from the default IRQ affinity mask.
write /proc/irq/default_smp_affinity 3f
# Core control parameters on silver
write /sys/devices/system/cpu/cpu0/core_ctl/not_preferred "0 0 0 0 1 1"
write /sys/devices/system/cpu/cpu0/core_ctl/min_cpus 4
write /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres 60
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 0
write /sys/devices/system/cpu/cpu0/core_ctl/task_thres 8
write /sys/devices/system/cpu/cpu6/core_ctl/enable 0
# Setting b.L scheduler parameters
write /proc/sys/kernel/sched_downmigrate 65
write /proc/sys/kernel/sched_upmigrate 71
write /proc/sys/kernel/sched_group_downmigrate 85
write /proc/sys/kernel/sched_group_upmigrate 100
write /proc/sys/kernel/sched_walt_rotate_big_tasks 1
# colocation v3 settings
write /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz 740000
# configure governor settings for little cluster
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "schedutil"
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 0
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 0
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq 1248000
# configure governor settings for big cluster
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor "schedutil"
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 0
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 0
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq 1324600
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
write /sys/devices/system/cpu/cpu6/sched_load_boost -6
write /sys/devices/system/cpu/cpu7/sched_load_boost -6
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load 85
write /sys/module/cpu_boost/parameters/input_boost_freq "0:1324800"
write /sys/module/cpu_boost/parameters/input_boost_ms 120
write /sys/module/cpu_boost/parameters/powerkey_input_boost_freq "0:0 1:0 2:0 3:0 4:1804800 5:0 6:0 7:2208000"
write /sys/module/cpu_boost/parameters/powerkey_input_boost_ms 400
service vendor.pd_mapper /vendor/bin/pd-mapper service vendor.pd_mapper /vendor/bin/pd-mapper
class core class core
user system user system