From 6580fdc5be44027b6a3d21e078d4a0a1142d31c9 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Wed, 28 Aug 2019 10:17:28 +0200 Subject: [PATCH] sdm660-common: Disable dm-verity hash prefetching. Prefetching appears to have a slightly negative effect on boot time, and actually makes boot time much worse when the available dm-bufio cache shrinks. Since we anticipate the dm-bufio cache will shrink (because of an increasing number of APEX dm-verity targets), disable prefetching completely. Boot time w/o this change: 12.085 Boot time with this change: 11.958 Boot time w/o this change with 128kB dm-bufio cache: 22.82 Boot time with this change with 128kB dm-bufio cache: 12.007 Test: atest google/perf/boottime/boottime-test Bug: 136247322 Change-Id: I12e342c5692fa89855d9c217f2e94287ff5642a6 --- rootdir/etc/init.verity.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootdir/etc/init.verity.rc b/rootdir/etc/init.verity.rc index 870c8954..17f1d46c 100644 --- a/rootdir/etc/init.verity.rc +++ b/rootdir/etc/init.verity.rc @@ -27,6 +27,9 @@ # # +on early-init + write /sys/module/dm_verity/parameters/prefetch_cluster 0 + on early-boot # Update dm-verity state and set partition.*.verified properties verity_update_state