diff options
author | zuoboqun <zuoboqun@baidu.com> | 2024-08-16 15:08:35 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-09-11 09:46:14 -0400 |
commit | 6166799f698512ab35e216b4ff4f7156f47923c6 (patch) | |
tree | f80e3ff3620d9937fa7f46c1e19859a9d3f5c09e /include | |
parent | a6896ebc8ff8dadef391f6fe4f8fd4d38bc7d538 (diff) | |
download | qemu-6166799f698512ab35e216b4ff4f7156f47923c6.zip qemu-6166799f698512ab35e216b4ff4f7156f47923c6.tar.gz qemu-6166799f698512ab35e216b4ff4f7156f47923c6.tar.bz2 |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/vhost.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index d75faf4..c75be46 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -171,6 +171,10 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, */ void vhost_dev_cleanup(struct vhost_dev *hdev); +void vhost_dev_disable_notifiers_nvqs(struct vhost_dev *hdev, + VirtIODevice *vdev, + unsigned int nvqs); + /** * vhost_dev_enable_notifiers() - enable event notifiers * @hdev: common vhost_dev structure |