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:
parent
729fdc8f6c
commit
d40220f154
5 changed files with 11 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
# Post boot configuration script targeted at sdm660/sdm636
|
# Post boot configuration script targeted at sdm660/sdm636
|
||||||
|
|
||||||
|
if echo "$available_governors" | grep interactive; then
|
||||||
function configure_zram_parameters() {
|
function configure_zram_parameters() {
|
||||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||||
MemTotal=${MemTotalStr:16:8}
|
MemTotal=${MemTotalStr:16:8}
|
||||||
|
@ -75,6 +76,10 @@ function configure_zram_parameters() {
|
||||||
swapon /dev/block/zram0 -p 32758
|
swapon /dev/block/zram0 -p 32758
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkswap /dev/block/zram0 > /dev/null 2>&1
|
||||||
|
swapon -p 2 /dev/block/zram0 > /dev/null 2>&1
|
||||||
|
|
||||||
configure_zram_parameters
|
configure_zram_parameters
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
# Non-A/B fstab.qcom variant
|
# Non-A/B fstab.qcom variant
|
||||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
#<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 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
|
/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
|
/devices/soc/c084000.sdhci/mmc_host* /storage/sdcard1 auto nodev,nosuid wait,voldmanaged=sdcard1:auto,encryptable=footer
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
# Non-A/B fstab.qcom variant
|
# Non-A/B fstab.qcom variant
|
||||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
#<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/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
|
/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
|
/devices/soc/c084000.sdhci/mmc_host* /storage/sdcard1 vfat nodev,nosuid wait,voldmanaged=sdcard1:auto,encryptable=footer
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
# A/B fstab.qcom variant
|
# A/B fstab.qcom variant
|
||||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
#<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/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 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
|
/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
|
||||||
|
|
|
@ -49,6 +49,9 @@ on init
|
||||||
write /sys/block/mmcblk0/queue/read_ahead_kb 128
|
write /sys/block/mmcblk0/queue/read_ahead_kb 128
|
||||||
write /sys/block/mmcblk0rpmb/bdi/read_ahead_kb 128
|
write /sys/block/mmcblk0rpmb/bdi/read_ahead_kb 128
|
||||||
write /sys/block/mmcblk0rpmb/queue/read_ahead_kb 128
|
write /sys/block/mmcblk0rpmb/queue/read_ahead_kb 128
|
||||||
|
|
||||||
|
# zRAM
|
||||||
|
write /sys/block/zram0/comp_algorithm "lz4"
|
||||||
|
|
||||||
on boot
|
on boot
|
||||||
# Set on boot cpusets
|
# Set on boot cpusets
|
||||||
|
|
Loading…
Reference in a new issue