crosvm/jail
David Stevens 5006e9601a swap: Truncate the swap file gradually
Truncating a large file can result in a significant amount of IO for
updating the filesystem metadata. When swap is disabled because an app
is being launched, this IO ends up competing with the IO needed to
launch the app, resulting in significant latency.

When disabling swap because of an app launch, cleaning up the swap file
is not high priority. However, when disabling swap because of low disk
space, the swap file needs to be cleaned up immediately. As such, make
the slow cleanup of the swap file an extra parameter to disabling swap.

BUG=b:288989607
TEST=tast run -buildbundle=crosint DUT arc.SwapAppLatency
TEST=cargo test -p swap --features enable

Change-Id: Icab2a55cdb9350cbb9e380583a31b546bd8e23cf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4653111
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Shin Kawamura <kawasin@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-07-05 02:17:32 +00:00
..
seccomp swap: Truncate the swap file gradually 2023-07-05 02:17:32 +00:00
src crosvm: let gpu render server mount bind drm render nodes only 2023-06-02 21:32:24 +00:00
build.rs jail: Compile seccomp policies in parallel 2023-05-25 19:13:12 +00:00
Cargo.toml jail: Compile seccomp policies in parallel 2023-05-25 19:13:12 +00:00