summary refs log tree commit diff
path: root/disk
diff options
context:
space:
mode:
authorCharles William Dick <cwd@google.com>2019-10-29 15:36:01 +0900
committerCommit Bot <commit-bot@chromium.org>2020-04-06 05:27:09 +0000
commit0bf8a5590f3556d8ec05c182cb612f254fd416e5 (patch)
tree4f2a34785d14ed0d4b3831cf032bf4d40c756dd2 /disk
parenta9a1d0227713d22df6262ca99dd622281e8dc9bf (diff)
downloadcrosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.tar
crosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.tar.gz
crosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.tar.bz2
crosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.tar.lz
crosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.tar.xz
crosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.tar.zst
crosvm-0bf8a5590f3556d8ec05c182cb612f254fd416e5.zip
crosvm balance available memory
Poll available memory from the host and guest every second. Resize the
balloon so that available memory in the guest is the same as in the
host.

balancemem_timer adds a Token::BalanceMemory to poll_ctx every second
which creates a balloon stats request.
When the stats results come back from the guest, we compute how much the
balloon should change to balance available memory between the guest and
host. If this new balloon size is > 5% different than the current
balloon size, we make a BalloonControlCommand::Adjust to resize the
balloon.

BUG=b:147334004
TEST=tast run <DUT> arc.MemoryChomeOSPerf*, .vm shows memory use similar
to the base arc test. tast run <DUT> arc.MemoryShiftingPerf.vm, both
chromeos and android counters report high numbers. Switch
LOWMEM_AVAILABLE constant to non-existing file, check the ARCVM reports
not running in ChromeOS, but still boots.

Change-Id: I8a581f86bf4881541d2f5f26dc541b35b862d244
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2061518
Reviewed-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Charles Dueck <cwd@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Charles Dueck <cwd@chromium.org>
Diffstat (limited to 'disk')
0 files changed, 0 insertions, 0 deletions