rootdir: init.rc to limit discard size to 128MB

In any case, UFS storage suffers from long discard latency.

Change-Id: Iaa8ef6eb862934af43254bd10873a12c3d34e926
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This commit is contained in:
Jaegeuk Kim 2019-11-27 15:42:10 -08:00
parent 834e4751e6
commit fe9e8a3fa5
1 changed files with 5 additions and 0 deletions

View File

@ -771,6 +771,11 @@ on boot
write /sys/fs/f2fs/${dev.mnt.blk.data}/cp_interval 200
write /sys/fs/f2fs/${dev.mnt.blk.data}/gc_urgent_sleep_time 50
# limit discard size to 128MB in order to avoid long IO latency
# for filesystem tuning first (dm or sda)
# Note that, if dm-<num> is used, sda/mmcblk0 should be tuned in vendor/init.rc
write /sys/devices/virtual/block/${dev.mnt.blk.data}/queue/discard_max_bytes 134217728
# Permissions for System Server and daemons.
chown system system /sys/power/autosleep