Commit 8aa61db4 authored by Rohit Gupta's avatar Rohit Gupta

CPU Affinity partitioninig between TX/RX threads when not using DEADLINE scheduler

parent bdaedcd4
...@@ -1122,9 +1122,10 @@ static void* eNB_thread_tx( void* param ) ...@@ -1122,9 +1122,10 @@ static void* eNB_thread_tx( void* param )
/* Set affinity mask to include CPUs 1 to MAX_CPUS */ /* Set affinity mask to include CPUs 1 to MAX_CPUS */
/* CPU 0 is reserved for UHD threads */ /* CPU 0 is reserved for UHD threads */
/* CPU 1 is reserved for all TX threads */
CPU_ZERO(&cpuset); CPU_ZERO(&cpuset);
for (j = 1; j < get_nprocs(); j++) //for (j = 1; j < get_nprocs(); j++)
CPU_SET(j, &cpuset); CPU_SET(1, &cpuset);
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
if (s != 0) if (s != 0)
...@@ -1402,8 +1403,10 @@ static void* eNB_thread_rx( void* param ) ...@@ -1402,8 +1403,10 @@ static void* eNB_thread_rx( void* param )
/* Set affinity mask to include CPUs 1 to MAX_CPUS */ /* Set affinity mask to include CPUs 1 to MAX_CPUS */
/* CPU 0 is reserved for UHD */ /* CPU 0 is reserved for UHD */
/* CPU 1 is reserved for all TX threads */
/* CPU 2..MAX_CPUS is reserved for all RX threads */
CPU_ZERO(&cpuset); CPU_ZERO(&cpuset);
for (j = 1; j < get_nprocs(); j++) for (j = 2; j < get_nprocs(); j++)
CPU_SET(j, &cpuset); CPU_SET(j, &cpuset);
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment