fs: Use cache=none by default

The cache= option from the virtiofsd backend is meant to be used
depending on how the user wants to use the guest page cache. For most
use cases, we want to bypass the guest page cache to reduce the guest
memory footprint, which is why "cache=none" should be the default.

"cache=always" is the other option when the user wants to do something
specific by using the guest page cache, but should not be the default
anymore.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-01-07 18:26:40 +01:00
parent 84445aae93
commit ad223f2b50
2 changed files with 6 additions and 6 deletions

View File

@@ -2935,12 +2935,12 @@ mod tests {
#[cfg_attr(not(feature = "mmio"), test)]
fn test_virtio_fs_dax_on_default_cache_size() {
test_virtio_fs(true, None, "always", &prepare_virtiofsd)
test_virtio_fs(true, None, "none", &prepare_virtiofsd)
}
#[cfg_attr(not(feature = "mmio"), test)]
fn test_virtio_fs_dax_on_cache_size_1_gib() {
test_virtio_fs(true, Some(0x4000_0000), "always", &prepare_virtiofsd)
test_virtio_fs(true, Some(0x4000_0000), "none", &prepare_virtiofsd)
}
#[cfg_attr(not(feature = "mmio"), test)]
@@ -3507,7 +3507,7 @@ mod tests {
let vfio_tap2 = "vfio-tap2";
let (mut daemon_child, virtiofsd_socket_path) =
prepare_virtiofsd(&guest.tmp_dir, vfio_path.to_str().unwrap(), "always");
prepare_virtiofsd(&guest.tmp_dir, vfio_path.to_str().unwrap(), "none");
let mut child = Command::new("target/release/cloud-hypervisor")
.args(&["--cpus", "boot=4"])