[dpdk-dev] [PATCH v2 1/3] vdpa/mlx5: optimize notification events

Maxime Coquelin maxime.coquelin at redhat.com
Mon Jun 29 11:05:22 CEST 2020



On 6/25/20 3:30 PM, Matan Azrad wrote:
> When the virtio guest driver doesn't work with poll mode, the driver
> creates event mechanism in order to schedule completion notifications
> for each virtq burst traffic.
> 
> When traffic comes to a virtq, a CQE will be added to the virtq CQ by
> the FW.
> The driver requests interrupt for the next CQE index, and when interrupt
> is triggered, the driver polls the CQ and notifies the guest by virtq
> callfd writing.
> 
> According to the described method, the interrupts will be triggered for
> each burst of trrafic. The burst size depends on interrupt latancy.
> 
> Interrupts management takes a lot of CPU cycles and using it for each
> traffic burst takes big portion of CPU capacity.
> 
> When traffic is on, using timer for CQ poll scheduling instead of
> interrupts saves a lot of CPU cycles.
> 
> Move CQ poll scheduling to be done by timer in case of running traffic.
> Request interrupts only when traffic is off.
> 
> The timer scheduling management is done by a new dedicated thread uses
> a usleep command.
> 
> Signed-off-by: Matan Azrad <matan at mellanox.com>
> ---
>  drivers/vdpa/mlx5/Makefile          |   1 +
>  drivers/vdpa/mlx5/mlx5_vdpa.h       |   7 ++
>  drivers/vdpa/mlx5/mlx5_vdpa_event.c | 175 ++++++++++++++++++++++++++++++------
>  3 files changed, 157 insertions(+), 26 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list