From 4783905cdbdd44a976a9405debe0fac8bbd7ad41 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sun, 8 Oct 2023 18:43:39 +0200 Subject: [PATCH] Increase priority for thread-pool threads For certain processing, e.g., in the case of FH 7.2, we need to ensure that critical L1 processing happens fast. Try to force speedy processing with this high priority. --- common/utils/threadPool/thread-pool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/utils/threadPool/thread-pool.c b/common/utils/threadPool/thread-pool.c index 310d8d445e..84347a88a1 100644 --- a/common/utils/threadPool/thread-pool.c +++ b/common/utils/threadPool/thread-pool.c @@ -150,8 +150,11 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name //Configure the thread scheduler policy for Linux // set the thread name for debugging sprintf(pool->allthreads->name,"%s%d_%d",tname,pool->nbThreads,pool->allthreads->coreID); + // we set the maximum priority for thread pool threads (which is close + // but not equal to Linux maximum). See also the corresponding commit + // message; initially introduced for O-RAN 7.2 fronthaul split threadCreate(&pool->allthreads->threadID, one_thread, (void *)pool->allthreads, - pool->allthreads->name, pool->allthreads->coreID, OAI_PRIORITY_RT); + pool->allthreads->name, pool->allthreads->coreID, OAI_PRIORITY_RT_MAX); pool->nbThreads++; }