提交 b5ee8f28 编写于 作者: P Paolo Bonzini 提交者: James Bottomley

[SCSI] virtio-scsi: unlock during kick

Separate virtqueue_kick_prepare from virtqueue_notify, so that the
expensive vmexit is done without holding the lock.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 a752359f
......@@ -264,9 +264,11 @@ static int virtscsi_kick_cmd(struct virtio_scsi *vscsi, struct virtqueue *vq,
ret = virtqueue_add_buf(vq, vscsi->sg, out_num, in_num, cmd, gfp);
if (ret >= 0)
virtqueue_kick(vq);
ret = virtqueue_kick_prepare(vq);
spin_unlock_irqrestore(&vscsi->vq_lock, flags);
if (ret > 0)
virtqueue_notify(vq);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册