From 9acb69f3e349f6bdf96f259e83b0583c9a22af9d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 18 Feb 2022 14:29:23 +0000 Subject: [PATCH] docs: Update documentation for Rust based virtiofsd Signed-off-by: Rob Bradford --- docs/fs.md | 16 ++++++++-------- docs/virtiofs-root.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/fs.md b/docs/fs.md index edb0deb53..a4716fed0 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -12,12 +12,12 @@ This virtual device relies on the _vhost-user_ protocol, which assumes the backe _Build virtiofsd_ ```bash -git clone --depth 1 "https://gitlab.com/virtio-fs/qemu.git" -b "qemu5.0-virtiofs-dax" $VIRTIOFSD_DIR -cd $VIRTIOFSD_DIR -./configure --prefix=$PWD --target-list=x86_64-softmmu -make virtiofsd -j `nproc` -sudo setcap cap_sys_admin+epi "virtiofsd" +git clone https://gitlab.com/virtio-fs/virtiofsd +pushd virtiofsd +cargo build --release +sudo setcap cap_sys_admin+epi target/release/virtiofsd ``` + _Create shared directory_ ```bash mkdir /tmp/shared_dir @@ -27,11 +27,11 @@ _Run virtiofsd_ ./virtiofsd \ -d \ --socket-path=/tmp/virtiofs \ - -o source=/tmp/shared_dir \ - -o cache=none + --shared-dir=/tmp/shared_dir \ + --cache=never ``` -The `cache=none` option should be the default when using `virtiofsd` with the __cloud-hypervisor__ VMM. This prevents from using the guest page cache, which reduces the memory footprint of the guest. When running multiple virtual machines on the same host, this will let the host deal with page cache, which will increase the density of virtual machines which can be launched. +The `cache=never` option should be the default when using `virtiofsd` with the __cloud-hypervisor__ VMM. This prevents from using the guest page cache, which reduces the memory footprint of the guest. When running multiple virtual machines on the same host, this will let the host deal with page cache, which will increase the density of virtual machines which can be launched. The `cache=always` option will allow for the guest page cache to be used, which will increase the memory footprint of the guest. This option should be used only for specific use cases where a single VM is going to be running on a host. diff --git a/docs/virtiofs-root.md b/docs/virtiofs-root.md index a851326d1..d3a23f17d 100644 --- a/docs/virtiofs-root.md +++ b/docs/virtiofs-root.md @@ -65,7 +65,7 @@ iface eth0 inet dhcp ```bash # starting in the directory above rootfs -sudo virtiofsd --socket-path=$PWD/virtiofs-rootfs.sock -o source=$PWD/rootfs -o cache=none & +sudo virtiofsd --socket-path=$PWD/virtiofs-rootfs.sock --shared-dir=$PWD/rootfs --cache=never & sudo cloud-hypervisor \ --cpus boot=1,max=1 \ --kernel vmlinux \