sm8550-common: init: Reset readahead values for 128 always

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: DarkAngelGR <asavvo01@gmail.com>
This commit is contained in:
Pranav Vashi
2023-05-07 19:05:57 +05:30
committed by DarkAngelGR
parent af07e90986
commit e5d1bd76ea

View File

@@ -79,21 +79,13 @@ function configure_zram_parameters() {
}
function configure_read_ahead_kb_values() {
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
dmpts=$(ls /sys/block/*/queue/read_ahead_kb | grep -e dm -e mmc -e sd)
# dmpts holds below read_ahead_kb nodes if exists:
# /sys/block/dm-0/queue/read_ahead_kb to /sys/block/dm-10/queue/read_ahead_kb
# /sys/block/sda/queue/read_ahead_kb to /sys/block/sdh/queue/read_ahead_kb
# Set 128 for <= 4GB &
# set 512 for >= 5GB targets.
if [ $MemTotal -le 4194304 ]; then
ra_kb=128
else
ra_kb=512
fi
ra_kb=128
if [ -f /sys/block/mmcblk0/bdi/read_ahead_kb ]; then
echo $ra_kb > /sys/block/mmcblk0/bdi/read_ahead_kb
fi