mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Flush host writeback queues, drop the page cache and sleep 1s for kernel housekeeping before each test run. The cloud-hypervisor block backend does buffered I/O on the host side, so dirty pages from prior write tests can accumulate and compete for I/O bandwidth with subsequent tests. Dropping caches ensures cold read tests get a consistent baseline rather than benefiting from data cached by prior tests. The brief cooldown lets the kernel finish tearing down KVM state and freeing pages from the previous VM before the next one starts. Requires root, which the metrics container provides. Silently fails otherwise. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>