Skip to content

Commit

Permalink
chiron: init: Tune EAS/FS parameters
Browse files Browse the repository at this point in the history
Change-Id: Ida0180a7cfe2be530ca7de32cb8004a79612491f
  • Loading branch information
BYZYB committed Jan 18, 2023
1 parent 8aeff30 commit 7b13ee9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
4 changes: 4 additions & 0 deletions rootdir/etc/init.qcom.rc
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,9 @@ on property:ro.vendor.ril.mbn_copy_completed=1
write /data/vendor/radio/copy_complete 1

on property:sys.boot_completed=1
# Used by sound trigger HAL
chown media audio /sys/kernel/wcd_cpe0/fw_name
chown media audio /sys/kernel/wdsp0/boot

start vendor.custom-post-boot
setprop vendor.post_boot.parsed 1
25 changes: 17 additions & 8 deletions rootdir/etc/init.target.rc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ on charger
start vendor.power_off_alarm

on init
# Disable UFS powersaving
write /sys/devices/soc/1da4000.ufshc/clkgate_enable 0
write /sys/devices/soc/1da4000.ufshc/clkscale_enable 0

# QSEE rpmb listener need symlink for bootdevice
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
Expand All @@ -73,10 +77,6 @@ on init
# Enable TCP Fast Open by default
write /proc/sys/net/ipv4/tcp_fastopen 3

# Enable UFS powersaving
write /sys/devices/soc/1da4000.ufshc/clkgate_enable 1
write /sys/devices/soc/1da4000.ufshc/clkscale_enable 1

# Update cpuset for foreground and background apps
write /dev/cpuset/background/cpus 0-1
write /dev/cpuset/foreground/cpus 0-3,6-7
Expand Down Expand Up @@ -175,9 +175,17 @@ on property:sys.boot_completed=1
setprop persist.radio.imei2 ""
setprop persist.radio.meid ""

# Used by sound trigger HAL
chown media audio /sys/kernel/wdsp0/boot
chown media audio /sys/kernel/wcd_cpe0/fw_name
# Enable UFS powersaving
write /sys/devices/soc/1da4000.ufshc/clkgate_enable 1
write /sys/devices/soc/1da4000.ufshc/clkscale_enable 1

# Tune FS for runtime
write /sys/block/sda/queue/read_ahead_kb 128
write /sys/block/sdb/queue/read_ahead_kb 128
write /sys/block/sdc/queue/read_ahead_kb 128
write /sys/block/sdd/queue/read_ahead_kb 128
write /sys/block/sde/queue/read_ahead_kb 128
write /sys/block/sdf/queue/read_ahead_kb 128

# Configure governor settings for little cluster
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "schedutil"
Expand All @@ -186,11 +194,12 @@ on property:sys.boot_completed=1

# Configure governor settings for big cluster
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor "schedutil"
write /sys/devices/system/cpu/cpufreq/policy4/schedutil/down_rate_limit_us 10000
write /sys/devices/system/cpu/cpufreq/policy4/schedutil/down_rate_limit_us 20000
write /sys/devices/system/cpu/cpufreq/policy4/schedutil/up_rate_limit_us 500

# Set default schedtune value for foreground and top-app
write /dev/stune/foreground/schedtune.prefer_idle 1
write /dev/stune/top-app/schedtune.boost 10
write /dev/stune/top-app/schedtune.prefer_idle 1

on property:vendor.ims.DATA_DAEMON_STATUS=1
Expand Down

0 comments on commit 7b13ee9

Please sign in to comment.