net/vdpa: Use readers/writers semaphore instead of vdpa_dev_mutex
authorEli Cohen <elic@nvidia.com>
Wed, 18 May 2022 13:38:01 +0000 (16:38 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 31 May 2022 16:44:21 +0000 (12:44 -0400)
commit0078ad905dc8eada34461312a0060b0904c57e2d
tree3fbcd2bcf23cd60cc5007880e7957af0deb8815f
parent13b00b135665c92065a27c0c39dd97e0f380bd4f
net/vdpa: Use readers/writers semaphore instead of vdpa_dev_mutex

Use rw_semaphore instead of mutex to control access to vdpa devices.
This can be especially beneficial in case processes poll on statistics
information.

Suggested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220518133804.1075129-4-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa.c