sm8350-common: rootdir: Update kernel post boot scripts from haydn V13.0.3.0.SKKMIXM
Change-Id: Id283d33472e4af8c3397728174908660e3762cd0
This commit is contained in:
parent
9da36d6713
commit
e5b53b9af8
@ -61,7 +61,7 @@ function configure_zram_parameters() {
|
|||||||
if [ -f /sys/block/zram0/use_dedup ]; then
|
if [ -f /sys/block/zram0/use_dedup ]; then
|
||||||
echo 1 > /sys/block/zram0/use_dedup
|
echo 1 > /sys/block/zram0/use_dedup
|
||||||
fi
|
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
|
# ZRAM may use more memory than it saves if SLAB_STORE_USER
|
||||||
# debug option is enabled.
|
# debug option is enabled.
|
||||||
@ -123,10 +123,24 @@ function configure_memory_parameters() {
|
|||||||
|
|
||||||
configure_zram_parameters
|
configure_zram_parameters
|
||||||
configure_read_ahead_kb_values
|
configure_read_ahead_kb_values
|
||||||
echo 0 > /proc/sys/vm/page-cluster
|
|
||||||
echo 100 > /proc/sys/vm/swappiness
|
echo 100 > /proc/sys/vm/swappiness
|
||||||
echo 1 > /proc/sys/vm/watermark_scale_factor
|
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
|
echo 0 > /proc/sys/vm/watermark_boost_factor
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
rev=`cat /sys/devices/soc0/revision`
|
rev=`cat /sys/devices/soc0/revision`
|
||||||
|
@ -61,7 +61,7 @@ function configure_zram_parameters() {
|
|||||||
if [ -f /sys/block/zram0/use_dedup ]; then
|
if [ -f /sys/block/zram0/use_dedup ]; then
|
||||||
echo 1 > /sys/block/zram0/use_dedup
|
echo 1 > /sys/block/zram0/use_dedup
|
||||||
fi
|
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
|
# ZRAM may use more memory than it saves if SLAB_STORE_USER
|
||||||
# debug option is enabled.
|
# debug option is enabled.
|
||||||
@ -125,13 +125,17 @@ function configure_memory_parameters() {
|
|||||||
|
|
||||||
configure_zram_parameters
|
configure_zram_parameters
|
||||||
configure_read_ahead_kb_values
|
configure_read_ahead_kb_values
|
||||||
echo 0 > /proc/sys/vm/page-cluster
|
|
||||||
echo 100 > /proc/sys/vm/swappiness
|
echo 100 > /proc/sys/vm/swappiness
|
||||||
|
|
||||||
# Disable wsf beacause we are using efk.
|
# Disable wsf beacause we are using efk.
|
||||||
# wsf Range : 1..1000. So set to bare minimum value 1.
|
# wsf Range : 1..1000. So set to bare minimum value 1.
|
||||||
echo 1 > /proc/sys/vm/watermark_scale_factor
|
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
|
echo 0 > /proc/sys/vm/watermark_boost_factor
|
||||||
|
fi
|
||||||
|
|
||||||
#Spawn 2 kswapd threads which can help in fast reclaiming of pages
|
#Spawn 2 kswapd threads which can help in fast reclaiming of pages
|
||||||
echo 2 > /proc/sys/vm/kswapd_threads
|
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
|
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
|
||||||
|
|
||||||
# configure input boost settings
|
# 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
|
echo 120 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
|
||||||
|
|
||||||
# configure governor settings for gold cluster
|
# configure governor settings for gold cluster
|
||||||
|
@ -131,6 +131,12 @@ function configure_memory_parameters() {
|
|||||||
# wsf Range : 1..1000. So set to bare minimum value 1.
|
# wsf Range : 1..1000. So set to bare minimum value 1.
|
||||||
echo 1 > /proc/sys/vm/watermark_scale_factor
|
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
|
#Spawn 2 kswapd threads which can help in fast reclaiming of pages
|
||||||
echo 2 > /proc/sys/vm/kswapd_threads
|
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
|
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
|
||||||
|
|
||||||
# configure input boost settings
|
# 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
|
echo 120 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
|
||||||
|
|
||||||
# configure governor settings for gold cluster
|
# configure governor settings for gold cluster
|
||||||
|
Loading…
Reference in New Issue
Block a user