[Virtio-fs] [virtiofsd-rs] MR opened: Implement a single thread mode

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Tue Sep 28 14:37:36 UTC 2021


Implement a mode that disables the thread pool and processes the
requests in a single thread.

By processing the requests in a single thread we lose the parallelism,
but in exchange we can apply some optimizations, such as acquiring the
vring mutex lock once and keeping it until all pending requests have
been processed.

The expectations are that the thread pool mode will perform better
when the backing filesystem is on a relatively slow storage and
there's a significant amount of I/O parallelism inside the guest,
while the single thread mode will consume less CPU and perform better
on pretty much every other case.

This mode can be enabled by specifying the value "0" for the
thread-pool-size command line argument. We also make "0" (single
thread mode) the default value, to mimic the behavior of the C
implementation.

Signed-off-by: Sergio Lopez <slp at redhat.com>
---
https://gitlab.com/virtio-fs/virtiofsd-rs/-/merge_requests/40




More information about the Virtio-fs mailing list