sm8350-common: rootdir: Update kernel post boot scripts from haydn V13.0.3.0.SKKMIXM

Change-Id: Id283d33472e4af8c3397728174908660e3762cd0
This commit is contained in:
Arian 2022-08-28 17:43:54 +02:00
parent 9da36d6713
commit e5b53b9af8
3 changed files with 36 additions and 8 deletions

View File

@ -61,7 +61,7 @@ function configure_zram_parameters() {
if [ -f /sys/block/zram0/use_dedup ]; then
echo 1 > /sys/block/zram0/use_dedup
fi
# echo "$zRamSizeMB""$diskSizeUnit" > /sys/block/zram0/disksize
echo "$zRamSizeMB""$diskSizeUnit" > /sys/block/zram0/disksize
# ZRAM may use more memory than it saves if SLAB_STORE_USER
# debug option is enabled.
@ -123,10 +123,24 @@ function configure_memory_parameters() {
configure_zram_parameters
configure_read_ahead_kb_values
echo 0 > /proc/sys/vm/page-cluster
echo 100 > /proc/sys/vm/swappiness
echo 1 > /proc/sys/vm/watermark_scale_factor
# add memory limit to camera cgroup
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
if [ $MemTotal -gt 8388608 ]; then
let LimitSize=838860800
else
let LimitSize=524288000
fi
echo $LimitSize > /dev/memcg/camera/provider/memory.soft_limit_in_bytes
if [ $MemTotal -le 8388608 ]; then
echo 0 > /proc/sys/vm/watermark_boost_factor
fi
}
rev=`cat /sys/devices/soc0/revision`

View File

@ -61,7 +61,7 @@ function configure_zram_parameters() {
if [ -f /sys/block/zram0/use_dedup ]; then
echo 1 > /sys/block/zram0/use_dedup
fi
#echo "$zRamSizeMB""$diskSizeUnit" > /sys/block/zram0/disksize
echo "$zRamSizeMB""$diskSizeUnit" > /sys/block/zram0/disksize
# ZRAM may use more memory than it saves if SLAB_STORE_USER
# debug option is enabled.
@ -125,13 +125,17 @@ function configure_memory_parameters() {
configure_zram_parameters
configure_read_ahead_kb_values
echo 0 > /proc/sys/vm/page-cluster
echo 100 > /proc/sys/vm/swappiness
# Disable wsf beacause we are using efk.
# wsf Range : 1..1000. So set to bare minimum value 1.
echo 1 > /proc/sys/vm/watermark_scale_factor
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
if [ $MemTotal -le 8388608 ]; then
echo 0 > /proc/sys/vm/watermark_boost_factor
fi
#Spawn 2 kswapd threads which can help in fast reclaiming of pages
echo 2 > /proc/sys/vm/kswapd_threads
@ -192,7 +196,11 @@ echo 691200 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
# configure input boost settings
echo "0:1171200" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
if [ $rev == "1.0" ]; then
echo "0:1382800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
else
echo "0:1305600" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
fi
echo 120 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
# configure governor settings for gold cluster

View File

@ -131,6 +131,12 @@ function configure_memory_parameters() {
# wsf Range : 1..1000. So set to bare minimum value 1.
echo 1 > /proc/sys/vm/watermark_scale_factor
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
if [ $MemTotal -le 8388608 ]; then
echo 0 > /proc/sys/vm/watermark_boost_factor
fi
#Spawn 2 kswapd threads which can help in fast reclaiming of pages
echo 2 > /proc/sys/vm/kswapd_threads
}
@ -192,7 +198,7 @@ echo 691200 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
# configure input boost settings
echo "0:1152000" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
echo "0:1324800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
echo 120 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
# configure governor settings for gold cluster