提交 6012ca81 编写于 作者: M Ming Lei 提交者: Paolo Bonzini

virtio-scsi: dataplane: suppress guest notification

This patch uses vring_should_notify() to suppress
guest notification, and looks notification frequency
can be decreased from ~33K/sec to ~2K/sec in my test
environment.
Suggested-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NMing Lei <ming.lei@canonical.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 c9cf45c1
......@@ -92,9 +92,14 @@ VirtIOSCSIReq *virtio_scsi_pop_req_vring(VirtIOSCSI *s,
void virtio_scsi_vring_push_notify(VirtIOSCSIReq *req)
{
VirtIODevice *vdev = VIRTIO_DEVICE(req->vring->parent);
vring_push(&req->vring->vring, &req->elem,
req->qsgl.size + req->resp_iov.size);
event_notifier_set(&req->vring->guest_notifier);
if (vring_should_notify(vdev, &req->vring->vring)) {
event_notifier_set(&req->vring->guest_notifier);
}
}
static void virtio_scsi_iothread_handle_ctrl(EventNotifier *notifier)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册