summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.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
commit37641374e84bb9cf75c054a28aa15bd3109da889 (patch)
tree206948f523299af0bf35ac7fb1ac2f5aeec4d554 /trusty/coverage/coverage.cpp
parent333639e952b685745dd3cee9f4a663ceb898ac88 (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.cpp')
0 files changed, 0 insertions, 0 deletions