mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_sm6250-common.git
synced 2025-05-07 14:27:17 +09:00
sm6250-common: Configure zRAM using fstab
* "32-bit overflow" CAF mentioned in the function wrapper inside post-boot script sounds very bs, since if it's 64-bit it won't be affected anyways * We do the setup using fstab instead to allow setting up more flags such as setting up backing device and compression streams; as such kanged from Pixels * zRAM size = 50% physical memory size to satisfy what CAF really wants * Use LZ4 compression even for regular devices Signed-off-by: Albert I <kras@raphielgang.org> Signed-off-by: Alexander Winkowski <dereference23@outlook.com> Change-Id: Ia6efb3d28e56fb026d9b28fc6633b2eac77dfa47
This commit is contained in:
parent
0d8f538cbf
commit
b09005f206
@ -49,4 +49,4 @@ vendor /vendor
|
||||
# The update_engine code looks for this entry in order to determine the boot device address
|
||||
# and fails if it does not find it.
|
||||
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
||||
/dev/block/zram0 none swap defaults zramsize=1073741824
|
||||
/dev/block/zram0 none swap defaults zramsize=50%,zram_backingdev_size=512M
|
||||
|
@ -155,5 +155,17 @@ on charger
|
||||
chmod 0666 /sys/class/backlight/panel0-backlight/brightness
|
||||
start vendor.power_off_alarm
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
# Read only one page at a time
|
||||
write /proc/sys/vm/page-cluster 0
|
||||
# Swap more aggressively
|
||||
write /proc/sys/vm/swappiness 100
|
||||
# Set zRAM compression algorithm to LZ4
|
||||
write /sys/block/zram0/comp_algorithm lz4
|
||||
# Enable zRAM data deduplication feature
|
||||
write /sys/block/zram0/use_dedup 1
|
||||
# Mount swap partitions specified in fstab
|
||||
swapon_all /vendor/etc/fstab.qcom
|
||||
|
||||
on property:ro.boot.multisim_config=*
|
||||
setprop persist.radio.multisim.config ${ro.boot.multisim_config}
|
||||
|
Loading…
x
Reference in New Issue
Block a user