summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorAkilesh Kailash <akailash@google.com>2020-11-26 03:56:59 +0000
committerAkilesh Kailash <akailash@google.com>2020-12-02 02:29:38 +0000
commita9f62c08b268a4728a3b51259c81a336014459af (patch)
tree206948f523299af0bf35ac7fb1ac2f5aeec4d554 /trusty/coverage/coverage_test.cpp
parent5482b03a0b1f27633a3da369a7981e87287412a3 (diff)
libsnapshot:VABC: Allow batch merge
Kernel will batch the merge operations only when block numbers of source and cow device are contiguous. Daemon will read the COW file and post-process the operations so that kernel can batch merge the potential operations. There are two key changes done in post-processing: 1: COW file contains all the copy operations at the beginning of the file. We cannot allow batch merging of COPY operations as a crash in between the overlapping copies can result in a corrupted state. Hence, allow copying individual blocks at a time. 2: Replace and Zero operations can be batch merged. However, reading our existing COW format as-is will not allow kernel to batch merge. Hence, process the operations in such a way that kernel can batch merge them. Furthermore, it is observed that sync() after every merge is a overhead. Hence, we will only sync() for copy operations only. For replace and zero operations, we will not explicitly sync. This is ok as crash in between replace/zero merge operations can redo those operations. However for copy, we have to make sure that sync is completed before next copy operation is initiated. Merge time of a full OTA on bramble is around ~60 seconds as compared to ~10+ minutes prior to this optimization. Note that we still have copy operations which are not batch merged. Hence, OTA with significant number of copy operations can still have overhead on merge timings. Bug: 174112589 Test: vts_libsnapshot, cow_snapuserd_test Full OTA on bramble. Signed-off-by: Akilesh Kailash <akailash@google.com> Change-Id: I1dc286067a26ea399fa5d4e8e826e5622ce3fa58
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions