mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
7781380f01
Currently, virtio-blk translates a FLUSH request to fsync system call. However, fsync always updates the metadata of a file, which causes extra journaling for metadata update. Since virtio-blk cares only the data of the given block image file, we should avoid updating extra metadata. After this change, virtio-blk now calls fdatasync for a FLUSH request. If a write operation wrote to a data block that is already allocated before, fdatasync can avoid triggering jdb2 journaling on an ext4 file system. Note there are structs which fall back to fsync for fdatasync. In addition, io_uring executor does not implement fdatasync yet. We observed statistically significant play_store_shown_time improvement on trogdor-arc-r by -1.614% with this change. Including non statistically significant data, we observed the following improvements. | Name | delta | Count | |-----------------------|---------|-------| | trogdor-arc-r (lazor) | -1.614% | 170 | | brya-arc-t (primus) | -1.478% | 200 | | octopus-arc-t (apel) | -0.887% | 190 | | kukui-arc-r (kakadu) | -0.451% | 170 | BUG=b:281609112 TEST=run a vm with block and confirmed fdatasync is called by strace Change-Id: Idc94a3ec169e9a5e04394079967f6d79ff4c32db Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4523029 Commit-Queue: Takaya Saeki <takayas@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |