mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
virtio_pci_modern: remove admin queue serialization lock
The admin queue operations are protected by newly introduced spin lock. To make it possible to issue parallel commands, remove the admin queue serialization lock. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240716113552.80599-14-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
4c3b54af90
commit
6d834691da
@ -45,8 +45,6 @@ struct virtio_pci_vq_info {
|
||||
struct virtio_pci_admin_vq {
|
||||
/* Virtqueue info associated with this admin queue. */
|
||||
struct virtio_pci_vq_info *info;
|
||||
/* serializing admin commands execution. */
|
||||
struct mutex cmd_lock;
|
||||
/* Protects virtqueue access. */
|
||||
spinlock_t lock;
|
||||
u64 supported_cmds;
|
||||
|
@ -167,12 +167,9 @@ int vp_modern_admin_cmd_exec(struct virtio_device *vdev,
|
||||
in_num++;
|
||||
}
|
||||
|
||||
mutex_lock(&vp_dev->admin_vq.cmd_lock);
|
||||
ret = virtqueue_exec_admin_cmd(&vp_dev->admin_vq,
|
||||
le16_to_cpu(cmd->opcode),
|
||||
sgs, out_num, in_num, cmd);
|
||||
mutex_unlock(&vp_dev->admin_vq.cmd_lock);
|
||||
|
||||
if (ret) {
|
||||
dev_err(&vdev->dev,
|
||||
"Failed to execute command on admin vq: %d\n.", ret);
|
||||
@ -837,7 +834,6 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev)
|
||||
vp_dev->vdev.id = mdev->id;
|
||||
|
||||
spin_lock_init(&vp_dev->admin_vq.lock);
|
||||
mutex_init(&vp_dev->admin_vq.cmd_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -845,6 +841,5 @@ void virtio_pci_modern_remove(struct virtio_pci_device *vp_dev)
|
||||
{
|
||||
struct virtio_pci_modern_device *mdev = &vp_dev->mdev;
|
||||
|
||||
mutex_destroy(&vp_dev->admin_vq.cmd_lock);
|
||||
vp_modern_remove(mdev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user