docs: Update documentation for Rust based virtiofsd

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-02-18 14:29:23 +00:00
parent 4c4eb8db40
commit 9acb69f3e3
2 changed files with 9 additions and 9 deletions

View File

@ -12,12 +12,12 @@ This virtual device relies on the _vhost-user_ protocol, which assumes the backe
_Build virtiofsd_ _Build virtiofsd_
```bash ```bash
git clone --depth 1 "https://gitlab.com/virtio-fs/qemu.git" -b "qemu5.0-virtiofs-dax" $VIRTIOFSD_DIR git clone https://gitlab.com/virtio-fs/virtiofsd
cd $VIRTIOFSD_DIR pushd virtiofsd
./configure --prefix=$PWD --target-list=x86_64-softmmu cargo build --release
make virtiofsd -j `nproc` sudo setcap cap_sys_admin+epi target/release/virtiofsd
sudo setcap cap_sys_admin+epi "virtiofsd"
``` ```
_Create shared directory_ _Create shared directory_
```bash ```bash
mkdir /tmp/shared_dir mkdir /tmp/shared_dir
@ -27,11 +27,11 @@ _Run virtiofsd_
./virtiofsd \ ./virtiofsd \
-d \ -d \
--socket-path=/tmp/virtiofs \ --socket-path=/tmp/virtiofs \
-o source=/tmp/shared_dir \ --shared-dir=/tmp/shared_dir \
-o cache=none --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. 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.

View File

@ -65,7 +65,7 @@ iface eth0 inet dhcp
```bash ```bash
# starting in the directory above rootfs # 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 \ sudo cloud-hypervisor \
--cpus boot=1,max=1 \ --cpus boot=1,max=1 \
--kernel vmlinux \ --kernel vmlinux \