vdpa/mlx5: revert event thread to normal priority
Checks
Commit Message
When converting to rte_thread API, the SCHED_RR policy
has been translated into RTE_THREAD_PRIORITY_REALTIME_CRITICAL.
But SCHED_RR was not effective prior to this conversion because
PTHREAD_EXPLICIT_SCHED attribute was missing initially.
Using the default priority RTE_THREAD_PRIORITY_NORMAL
should revert to the original behaviour.
By the way, RTE_THREAD_PRIORITY_REALTIME_CRITICAL is difficult
to manage properly and is allowed only on Windows so far.
Fixes: a7ba40b2b1bf ("drivers: convert to internal control threads")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 -
1 file changed, 1 deletion(-)
Comments
On 10/31/23 15:57, Thomas Monjalon wrote:
> When converting to rte_thread API, the SCHED_RR policy
> has been translated into RTE_THREAD_PRIORITY_REALTIME_CRITICAL.
> But SCHED_RR was not effective prior to this conversion because
> PTHREAD_EXPLICIT_SCHED attribute was missing initially.
>
> Using the default priority RTE_THREAD_PRIORITY_NORMAL
> should revert to the original behaviour.
>
> By the way, RTE_THREAD_PRIORITY_REALTIME_CRITICAL is difficult
> to manage properly and is allowed only on Windows so far.
>
> Fixes: a7ba40b2b1bf ("drivers: convert to internal control threads")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> index fa26471b18..9557c1042e 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> @@ -514,7 +514,6 @@ mlx5_vdpa_cqe_event_setup(struct mlx5_vdpa_priv *priv)
> DRV_LOG(ERR, "Failed to initialize thread attributes");
> goto out;
> }
> - attr.priority = RTE_THREAD_PRIORITY_REALTIME_CRITICAL;
> if (priv->event_core != -1)
> CPU_SET(priv->event_core, &attr.cpuset);
> else
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
@@ -514,7 +514,6 @@ mlx5_vdpa_cqe_event_setup(struct mlx5_vdpa_priv *priv)
DRV_LOG(ERR, "Failed to initialize thread attributes");
goto out;
}
- attr.priority = RTE_THREAD_PRIORITY_REALTIME_CRITICAL;
if (priv->event_core != -1)
CPU_SET(priv->event_core, &attr.cpuset);
else