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.
This commit is contained in:
Robert Schmidt
2024-01-23 13:41:36 +01:00
parent 1a8582aaf2
commit 4783905cdb
+4 -1
View File
@@ -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++;
}