Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI][mem_monitor] fix bug for snap-resume tests
The memory monitor depends on knowing the size of the guest memory. This is because we only measure Firecracker's memory overhead (i.e by excluding the associated guest memory). Memory monitor is now started in the "basic_config" function which is the function all tests use for attaching a default config to the microVM. The initial guest mem size known to the mem monitor will be the one set through "basic_config". If any other subsequent operations modify the size of the guest memory, the memory monitor needs to be made aware of that. Ideally we would want to make this mechanism more robust by correlating the memory monitor to the guest memory without the developer being required to do this explicitly. The method we could use would be for the memory monitor thread to call into machine_config to get the size of guest memory. I am afraid though that by doing that, we will be adding latency in the memory monitor and possibly miss on memory exceedances since we would be spending time doing GET API requests. I propose to leave things function the same way for the moment, since tests that do not modify the size of guest memory properly should fail. They did not fail up until now, because we had a bug in the logic that checks whether there were any threshold exceedance. Signed-off-by: Diana Popa <[email protected]>
- Loading branch information