From 70d9afbd1f16cadec9a745933daf30785dc31b0e Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Fri, 7 Feb 2025 13:59:30 +0800 Subject: [PATCH] runtime-rs: Add block_device_cache_direct to config of ch and dragonball Add block_device_cache_direct to config of ch and dragonball in runtime-rs because they support this config. Fixes: #10849 Signed-off-by: Hui Zhu --- src/runtime-rs/config/configuration-cloud-hypervisor.toml.in | 5 +++++ src/runtime-rs/config/configuration-dragonball.toml.in | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in b/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in index 726a2b33ad..c10d72e465 100644 --- a/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in +++ b/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in @@ -172,6 +172,11 @@ default_bridges = @DEFBRIDGES@ # rootfs is backed by a block device. block_device_driver = "virtio-blk-pci" +# Specifies cache-related options for block devices. +# Denotes whether use of O_DIRECT (bypass the host page cache) is enabled. +# Default false +#block_device_cache_direct = true + # Enable huge pages for VM RAM, default false # Enabling this will result in the VM memory # being allocated using huge pages. diff --git a/src/runtime-rs/config/configuration-dragonball.toml.in b/src/runtime-rs/config/configuration-dragonball.toml.in index e2dc7ae856..5d1b8e408f 100644 --- a/src/runtime-rs/config/configuration-dragonball.toml.in +++ b/src/runtime-rs/config/configuration-dragonball.toml.in @@ -204,6 +204,11 @@ virtio_fs_extra_args = @DEFVIRTIOFSEXTRAARGS@ # Metadata, data, and pathname lookup are cached in guest and never expire. virtio_fs_cache = "@DEFVIRTIOFSCACHE@" +# Specifies cache-related options for block devices. +# Denotes whether use of O_DIRECT (bypass the host page cache) is enabled. +# Default false +#block_device_cache_direct = true + # Enable huge pages for VM RAM, default false # Enabling this will result in the VM memory # being allocated using huge pages.