Subject: Re: [TEST] VirtioFS instead of 9p (was: net-next is OPEN)

From: Jakub Kicinski <[email-masked]>
Date: Mon, 25 Mar 2024 18:42:37 -0700

On Mon, 25 Mar 2024 17:32:54 +0100 Matthieu Baerts wrote:
> With 'virtme-ng' used by NIPA, it is possible to use VirtioFS or
> OverlayFS instead of 9p.
> 
> VirtioFS seems to perform much better than 9p [1]. All you need is to
> install "virtiofsd" daemon in userspace [2]. It looks like Nipa is still
> using 9p for the rootfs, it might be good to switch to VirtioFS if it is
> easy :)

"All you need is to install" undersells it a little :)

It's not packaged for silly OS^w^w AWS Linux. 
And the Rust that comes with it doesn't seem to be able to build it :(

error[E0658]: use of unstable library feature 'is_some_and'
  --> /home/virtme/.cargo/registry/src/github.com-1ecc6299db9ec823/vhost-user-backend-0.14.0/src/bitmap.rs:87:14
   |
87 |             .is_some_and(|bitmap| bitmap.dirty_at(self.base_address.saturating_add(offset)))
   |              ^^^^^^^^^^^
   |
   = note: see issue #93050 <https://github.com/rust-lang/rust/issues/93050> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `vhost-user-backend` due to previous error
warning: build failed, waiting for other jobs to finish...

Onto the ToDo pile it goes :)

> If you want to use OverlayFS (e.g. to mount the kselftests dir), you can
> use "vng --overlay-rwdir". If you use "vng --rwdir" (or "vng --rodir"),
> 9p will be used. Maybe better to recommend that on the wiki [3]?
> 
> (The MPTCP CI didn't hit the bug with 9p, because it now uses vng with
> VirtioFS.)