[dpdk-stable] [PATCH 19.11.9] eal/windows: fix default thread priority
Tal Shnaiderman
talshn at nvidia.com
Sun May 23 10:12:42 CEST 2021
[ 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 at nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk at 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
More information about the stable
mailing list