On Tue, Jul 23, 2019 at 10:18:01AM -0600, Chris Friesen wrote: > I'm looking for information on what the qemu architecture looks like for > processing virtio network packets in a two-vCPU guest. > > It looks like there's an IO thread doing a decent fraction of the work, > separate from the vCPU threads--is that correct? There's no disk involved > in this case, purely network packet processing.
Most production x86 KVM guests use vhost_net.ko to perform virtio-net rx/tx virtqueue processing in the host kernel. That means the QEMU code isn't used and the code path is totally different. Before spending too much time on this, check which code path you are interested in. If you are using QEMU's virtio-net without vhost then the main loop thread processes rx/tx virtqueue kicks and packet rx/tx events. The vcpu threads are not directly involved because the ioeventfd feature is used to direct virtqueue kicks to the main loop thread instead of blocking vcpu threads. Stefan
signature.asc
Description: PGP signature