sm6150-common: Tune zram performance

-Switch to LZ4 for better overall performance
-Set max_comp_streams to num of cores since upstream also moves this to
percpu.
-Set page-cluster to 0 as the incremental cost of reading 1 page at a
time is negligible for zram

Bug: 38249616
Test: boot and run zram-perf showing better performance
Change-Id: I0b92b246d773db85aa03d033b2cecee54347cbd1
This commit is contained in:
Wei Wang 2017-05-17 15:27:32 -07:00 committed by Arian
parent b2d8bf6c26
commit 73becf7452
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9
2 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# Android fstab file. # Android fstab file.
#<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 defaults zramsize=1073741824 /dev/block/zram0 none swap defaults zramsize=1073741824,max_comp_streams=8

View File

@ -53,6 +53,10 @@ on init
write /sys/block/sde/queue/read_ahead_kb 2048 write /sys/block/sde/queue/read_ahead_kb 2048
write /sys/block/sde/queue/nr_requests 256 write /sys/block/sde/queue/nr_requests 256
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz4
write /proc/sys/vm/page-cluster 0
on fs on fs
mount_all --early /vendor/etc/fstab.qcom mount_all --early /vendor/etc/fstab.qcom