summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@google.com>2019-11-27 15:42:10 -0800
committerJaegeuk Kim <jaegeuk@google.com>2020-01-23 19:39:52 +0000
commit9e09cbceb016e7646b15b29f17c905b14a9fbab3 (patch)
tree5c28cb84965d9c10f79ae4f19a71f17453265556 /rootdir
parent81303e4c8f3889857925d4253a8a134d088a13a0 (diff)
downloadsystem_core-9e09cbceb016e7646b15b29f17c905b14a9fbab3.tar.gz
system_core-9e09cbceb016e7646b15b29f17c905b14a9fbab3.tar.bz2
system_core-9e09cbceb016e7646b15b29f17c905b14a9fbab3.zip
rootdir: init.rc to limit discard size to 128MB
In any case, UFS storage suffers from long discard latency. Bug: 148209614 Change-Id: Iaa8ef6eb862934af43254bd10873a12c3d34e926 Merged-In: Iaa8ef6eb862934af43254bd10873a12c3d34e926 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/init.rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 0fa9febdd..e898d4dc9 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -682,6 +682,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 radio system /sys/android_power/state
chown radio system /sys/android_power/request_state