sdm660-common: Enable block-based 2GB zRAM for EAS

* Guard the post boot script for HMP only

Partially reverts commit fd809eba57.
Signed-off-by: OdSazib <odsazib@gmail.com>.
This commit is contained in:
OdSazib 2020-12-19 05:02:23 +06:00
parent 729fdc8f6c
commit d40220f154
No known key found for this signature in database
GPG key ID: 0954440B60470871
5 changed files with 11 additions and 0 deletions

View file

@ -29,6 +29,7 @@
# Post boot configuration script targeted at sdm660/sdm636
if echo "$available_governors" | grep interactive; then
function configure_zram_parameters() {
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
@ -75,6 +76,10 @@ function configure_zram_parameters() {
swapon /dev/block/zram0 -p 32758
fi
}
fi
mkswap /dev/block/zram0 > /dev/null 2>&1
swapon -p 2 /dev/block/zram0 > /dev/null 2>&1
configure_zram_parameters

View file

@ -11,6 +11,7 @@
# Non-A/B fstab.qcom variant
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/zram0 none swap sw zramsize=2147483648
/dev/block/bootdevice/by-name/userdata /data ext4 nodev,noatime,nosuid,barrier=1,noauto_da_alloc,discard,lazytime wait,check,encryptable=footer,quota,reservedsize=128M
/dev/block/bootdevice/by-name/userdata /data f2fs nodev,noatime,nosuid,nodiratime,fsync_mode=nobarrier,background_gc=off wait,check,encryptable=footer,quota,reservedsize=128M
/devices/soc/c084000.sdhci/mmc_host* /storage/sdcard1 auto nodev,nosuid wait,voldmanaged=sdcard1:auto,encryptable=footer

View file

@ -11,6 +11,7 @@
# Non-A/B fstab.qcom variant
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/zram0 none swap sw zramsize=2147483648
/dev/block/bootdevice/by-name/cust /metadata ext4 nodev,noatime,nosuid,discard wait,check,formattable
/dev/block/bootdevice/by-name/userdata /data ext4 nodev,noatime,nosuid,barrier=1,noauto_da_alloc,discard wait,check,fileencryption=ice,quota,reservedsize=512M
/devices/soc/c084000.sdhci/mmc_host* /storage/sdcard1 vfat nodev,nosuid wait,voldmanaged=sdcard1:auto,encryptable=footer

View file

@ -7,6 +7,7 @@
# A/B fstab.qcom variant
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/zram0 none swap sw zramsize=2147483648
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,slotselect
/dev/block/bootdevice/by-name/userdata /data ext4 nodev,noatime,nosuid,barrier=1,noauto_da_alloc,discard,lazytime wait,check,encryptable=footer,quota,formattable,length=-16384
/dev/block/bootdevice/by-name/userdata /data f2fs nodev,noatime,nosuid,inline_xattr,reserve_root=32768,resgid=1065,background_gc=on wait,check,encryptable=footer,quota,formattable,length=-16384

View file

@ -49,6 +49,9 @@ on init
write /sys/block/mmcblk0/queue/read_ahead_kb 128
write /sys/block/mmcblk0rpmb/bdi/read_ahead_kb 128
write /sys/block/mmcblk0rpmb/queue/read_ahead_kb 128
# zRAM
write /sys/block/zram0/comp_algorithm "lz4"
on boot
# Set on boot cpusets