[PATCH v4 07/15] vdpa/mlx5: optimize datapath-control synchronization
Maxime Coquelin
maxime.coquelin at redhat.com
Mon Jun 20 11:25:44 CEST 2022
On 6/18/22 11:02, Li Zhang wrote:
> The driver used a single global lock for any synchronization
> needed for the datapath and control path.
> It is better to group the critical sections with
> the other ones that should be synchronized.
>
> Replace the global lock with the following locks:
>
> 1.virtq locks(per virtq) synchronize datapath polling and
> parallel configurations on the same virtq.
> 2.A doorbell lock synchronizes doorbell update,
> which is shared for all the virtqs in the device.
> 3.A steering lock for the shared steering objects updates.
>
> Signed-off-by: Li Zhang <lizh at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa.c | 24 ++++---
> drivers/vdpa/mlx5/mlx5_vdpa.h | 13 ++--
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 97 ++++++++++++++++++-----------
> drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 36 ++++++++---
> drivers/vdpa/mlx5/mlx5_vdpa_steer.c | 7 ++-
> drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 88 +++++++++++++++++++-------
> 6 files changed, 186 insertions(+), 79 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list