]> www.infradead.org Git - users/dwmw2/qemu.git/commit
vhost_net: configure all host notifiers in a single MR transaction
authorzuoboqun <zuoboqun@baidu.com>
Fri, 16 Aug 2024 07:08:35 +0000 (15:08 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Sep 2024 13:46:14 +0000 (09:46 -0400)
commit6166799f698512ab35e216b4ff4f7156f47923c6
treef80e3ff3620d9937fa7f46c1e19859a9d3f5c09e
parenta6896ebc8ff8dadef391f6fe4f8fd4d38bc7d538
vhost_net: configure all host notifiers in a single MR transaction

This allows the vhost_net device which has multiple virtqueues to batch
the setup of all its host notifiers. This significantly reduces the
vhost_net device starting and stoping time, e.g. the time spend
on enabling notifiers reduce from 630ms to 75ms and the time spend on
disabling notifiers reduce from 441ms to 45ms for a VM with 192 vCPUs
and 15 vhost-user-net devices (64vq per device) in our case.

Signed-off-by: zuoboqun <zuoboqun@baidu.com>
Message-Id: <20240816070835.8309-1-zuoboqun@baidu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/vhost_net.c
hw/virtio/vhost.c
include/hw/virtio/vhost.h