patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11.9] eal/windows: fix default thread priority
@ 2021-05-23  8:12 Tal Shnaiderman
  2021-05-31  8:41 ` Christian Ehrhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Tal Shnaiderman @ 2021-05-23  8:12 UTC (permalink / raw)
  To: stable, christian.ehrhardt
  Cc: thomas, pallavi.kadam, dmitry.kozliuk, navasile, dmitrym, xuemingl

[ upstream commit 16afcbfa30e9c2831264fb349457a4228fa687c8 ]

The hard-coded thread priority for Windows threads in EAL
is REALTIME_PRIORITY_CLASS/THREAD_PRIORITY_TIME_CRITICAL.

This results in issues with DPDK threads causing OS thread starvation
and eventually a bugcheck.

The fix reduce the thread priority to
NORMAL_PRIORITY_CLASS/THREAD_PRIORITY_NORMAL.

Bugzilla ID: 600

Reported-by: Odi Assli <odia@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/windows/eal/eal_thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
index 0591d4c7fb..af1e7fe2ea 100644
--- a/lib/librte_eal/windows/eal/eal_thread.c
+++ b/lib/librte_eal/windows/eal/eal_thread.c
@@ -147,8 +147,8 @@ eal_thread_create(pthread_t *thread)
 	if (!th)
 		return -1;
 
-	SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
-	SetThreadPriority(th, THREAD_PRIORITY_TIME_CRITICAL);
+	SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
+	SetThreadPriority(th, THREAD_PRIORITY_NORMAL);
 
 	return 0;
 }
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 19.11.9] eal/windows: fix default thread priority
  2021-05-23  8:12 [dpdk-stable] [PATCH 19.11.9] eal/windows: fix default thread priority Tal Shnaiderman
@ 2021-05-31  8:41 ` Christian Ehrhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ehrhardt @ 2021-05-31  8:41 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dpdk stable, Thomas Monjalon, pallavi.kadam, dmitry.kozliuk,
	navasile, dmitrym, Xueming Li

On Sun, May 23, 2021 at 10:13 AM Tal Shnaiderman <talshn@nvidia.com> wrote:
>
> [ upstream commit 16afcbfa30e9c2831264fb349457a4228fa687c8 ]

Thank you for the backport, queued for 19.11.9 now

> The hard-coded thread priority for Windows threads in EAL
> is REALTIME_PRIORITY_CLASS/THREAD_PRIORITY_TIME_CRITICAL.
>
> This results in issues with DPDK threads causing OS thread starvation
> and eventually a bugcheck.
>
> The fix reduce the thread priority to
> NORMAL_PRIORITY_CLASS/THREAD_PRIORITY_NORMAL.
>
> Bugzilla ID: 600
>
> Reported-by: Odi Assli <odia@nvidia.com>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
>  lib/librte_eal/windows/eal/eal_thread.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
> index 0591d4c7fb..af1e7fe2ea 100644
> --- a/lib/librte_eal/windows/eal/eal_thread.c
> +++ b/lib/librte_eal/windows/eal/eal_thread.c
> @@ -147,8 +147,8 @@ eal_thread_create(pthread_t *thread)
>         if (!th)
>                 return -1;
>
> -       SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
> -       SetThreadPriority(th, THREAD_PRIORITY_TIME_CRITICAL);
> +       SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
> +       SetThreadPriority(th, THREAD_PRIORITY_NORMAL);
>
>         return 0;
>  }
> --
> 2.16.1.windows.4
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-31  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23  8:12 [dpdk-stable] [PATCH 19.11.9] eal/windows: fix default thread priority Tal Shnaiderman
2021-05-31  8:41 ` Christian Ehrhardt

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git