mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
0897c87424
This splits the `crosvm swap enable` command, which pauses the whole crosvm processes while it write all the active pages on the guest memory into the swap file, into 2 commands. On `crosvm swap enable` command, the monitor process just moves the guest memroy to the staging memory while blocking the whole crosvm processes with SIGSTOP. On `crosvm swap out` command, the monitor process writes the active pages in the staging memory to the swap file. The page faults between `swap enable` and `swap out` are swapped in from the staging memory. By waiting some time before sending swap out request after enabling vmm-swap, hot pages on the guest memory, which are frequently accessed, are swapped in from the staging memory and we can reduce the TBW of the swap file and reduce the latency of page faults for hot pages. BUG=b:263830401 TEST=cargo test -p swap -p base Change-Id: Ia83f5052cc0bd4d25089c6a6680e40a1fa1661c0 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4134149 Reviewed-by: David Stevens <stevensd@chromium.org> Commit-Queue: Shin Kawamura <kawasin@google.com> |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |