mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 10:32:10 +00:00
4a33bcb2ad
Enable the ZERO_MESSAGE_{OPEN,OPENDIR} features when the cache policy is "always". This feature allows the kernel to skip the open message after a successful lookup, reducing the amount of work that the server does. This is implemented by changing the file descriptors stored in the InodeData from O_PATH fds to O_RDONLY fds for files and directories. Other types of directory entries (symlinks, special files, etc) still use O_PATH fds. If the kernel sends a write request for an fd opened in read-only mode or a read request for an fd opened in write-only mode (can happen when creating a new file), then we open a new fd in read-write mode before performing the read/write. This only needs to happen the first time we get a request that doesn't match the open flags. This change should improve performance of opening and reading many small files. It improves the blogbench read score by ~40% but reduces the write score by ~25%. It also reduces the work done by the virtio-fs server when loading roblox. The first load time is reduced by ~17% (3.04 seconds -> 2.52 seconds) and non-initial load times are reduced by 50% (0.3 seconds -> 0.15 seconds). BUG=none TEST=vm.Virtiofs, vm.Blogbench.virtiofs, arc.PlayStore.vm, load roblox inside arcvm Change-Id: I042246a2fd9f7a0feeffc0f629073c594626392a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2684066 Reviewed-by: Stephen Barber <smbarber@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_serial | ||
Cargo.toml |