mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
4abcdf6b45
The previous implementation of QcowRawFile::read_pointer_table() called read_exact() on the underlying File for each individual entry in the table; for a typical 64KB cluster size, this would mean read() would be called 8192 times per cluster. Similarly, read_refcount_block() would issue 32768 individual read() calls per cluster. Using zerocopy, we can read the whole Vec<u64> or Vec<u16> reinterpreted as a byte slice in a single read() call, then perform endian translation and masking in a separate loop, which should be significantly more efficient. Change-Id: Ia66f4b9363be63935388adaa185a31b515f47951 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5977144 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Cody Schuffelen <schuffelen@google.com> Reviewed-by: Frederick Mayle <fmayle@google.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |