vdpa/mlx5: revert event thread to normal priority

Message ID 20231031145756.517091-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series vdpa/mlx5: revert event thread to normal priority |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Thomas Monjalon Oct. 31, 2023, 2:57 p.m. UTC
  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

Maxime Coquelin Nov. 2, 2023, 9:57 a.m. UTC | #1
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
  

Patch

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