]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Use readers/writers semaphore instead of mutex
authorEli Cohen <elic@nvidia.com>
Wed, 18 May 2022 13:38:04 +0000 (16:38 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 31 May 2022 16:44:23 +0000 (12:44 -0400)
commit0effb93d1e59b38bedbcc38460aa017ea0a4a8d1
tree38e6e4201e9630c2ea215eab7e691200dba53cca
parent723637813e9100757eeb323b3df7efb15547726d
vdpa/mlx5: Use readers/writers semaphore instead of mutex

Reading statistics could be done intensively and by several processes
concurrently. Reader's lock is sufficient in this case.

Change reslock from mutex to a rwsem.

Suggested-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220518133804.1075129-7-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c