mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
[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: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
a752359f2b
commit
b5ee8f2802
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user