Remove DEADLINE_SCHEDULER and CPU_AFFINITY defines
This commit is contained in:
@@ -877,8 +877,6 @@ include_directories ("${OPENAIR_DIR}/sdr/COMMON")
|
|||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
||||||
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
|
|
||||||
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
|
|
||||||
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
|
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
|
||||||
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
|
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
|
|||||||
XFORMS="True"
|
XFORMS="True"
|
||||||
SKIP_SHARED_LIB_FLAG="False"
|
SKIP_SHARED_LIB_FLAG="False"
|
||||||
PRINT_STATS="False"
|
PRINT_STATS="False"
|
||||||
DEADLINE_SCHEDULER_FLAG_USER=""
|
|
||||||
HW="None"
|
HW="None"
|
||||||
TP="Ethernet"
|
TP="Ethernet"
|
||||||
EPC=0
|
EPC=0
|
||||||
@@ -346,26 +345,6 @@ function main() {
|
|||||||
BUILD_COVERITY_SCAN=1
|
BUILD_COVERITY_SCAN=1
|
||||||
echo_info "Will build Coverity-Scan objects for upload"
|
echo_info "Will build Coverity-Scan objects for upload"
|
||||||
shift;;
|
shift;;
|
||||||
--disable-deadline)
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
|
||||||
CMAKE_CMD="$CMAKE_CMD -DDEADLINE_SCHEDULER=False"
|
|
||||||
echo_info "Disabling the usage of deadline scheduler"
|
|
||||||
shift 1;;
|
|
||||||
--enable-deadline)
|
|
||||||
DEADLINE_SCHEDULER_FLAG_USER="True"
|
|
||||||
CMAKE_CMD="$CMAKE_CMD -DDEADLINE_SCHEDULER=True"
|
|
||||||
echo_info "Enabling the usage of deadline scheduler"
|
|
||||||
shift 1;;
|
|
||||||
--enable-cpu-affinity)
|
|
||||||
CPU_AFFINITY_FLAG_USER="True"
|
|
||||||
CMAKE_CMD="$CMAKE_CMD -DCPU_AFFINITY=True"
|
|
||||||
echo_info "Enabling CPU Affinity (only valid when not using deadline scheduler)"
|
|
||||||
shift 1;;
|
|
||||||
--disable-cpu-affinity)
|
|
||||||
CPU_AFFINITY_FLAG_USER="False"
|
|
||||||
CMAKE_CMD="$CMAKE_CMD -DCPU_AFFINITY=False"
|
|
||||||
echo_info "Disabling CPU Affinity (only valid when not using deadline scheduler)"
|
|
||||||
shift 1;;
|
|
||||||
--disable-T-Tracer)
|
--disable-T-Tracer)
|
||||||
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
|
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
|
||||||
echo_info "Disabling the T tracer"
|
echo_info "Disabling the T tracer"
|
||||||
@@ -483,15 +462,6 @@ function main() {
|
|||||||
echo_info "RF HW set to $HW"
|
echo_info "RF HW set to $HW"
|
||||||
# If the user doesn't specify the Linux scheduler to use, we set a value
|
# If the user doesn't specify the Linux scheduler to use, we set a value
|
||||||
|
|
||||||
#Disable CPU Affinity for deadline scheduler
|
|
||||||
if [ "$DEADLINE_SCHEDULER_FLAG_USER" = "True" ] ; then
|
|
||||||
CPU_AFFINITY_FLAG_USER="False"
|
|
||||||
CMAKE_CMD="$CMAKE_CMD -DCPU_AFFINITY=False"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo_info "Flags for Deadline scheduler: $DEADLINE_SCHEDULER_FLAG_USER"
|
|
||||||
echo_info "Flags for CPU Affinity: $CPU_AFFINITY_FLAG_USER"
|
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# Setting and printing OAI envs, we should check here #
|
# Setting and printing OAI envs, we should check here #
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|||||||
@@ -280,28 +280,6 @@ void thread_top_init(char *thread_name,
|
|||||||
uint64_t deadline,
|
uint64_t deadline,
|
||||||
uint64_t period) {
|
uint64_t period) {
|
||||||
|
|
||||||
#ifdef DEADLINE_SCHEDULER
|
|
||||||
struct sched_attr attr;
|
|
||||||
|
|
||||||
unsigned int flags = 0;
|
|
||||||
|
|
||||||
attr.size = sizeof(attr);
|
|
||||||
attr.sched_flags = 0;
|
|
||||||
attr.sched_nice = 0;
|
|
||||||
attr.sched_priority = 0;
|
|
||||||
|
|
||||||
attr.sched_policy = SCHED_DEADLINE;
|
|
||||||
attr.sched_runtime = runtime;
|
|
||||||
attr.sched_deadline = deadline;
|
|
||||||
attr.sched_period = period;
|
|
||||||
|
|
||||||
if (sched_setattr(0, &attr, flags) < 0 ) {
|
|
||||||
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
|
|
||||||
fprintf(stderr,"sched_setattr Error = %s",strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else //LOW_LATENCY
|
|
||||||
int policy, s, j;
|
int policy, s, j;
|
||||||
struct sched_param sparam;
|
struct sched_param sparam;
|
||||||
char cpu_affinity[1024];
|
char cpu_affinity[1024];
|
||||||
@@ -314,27 +292,6 @@ void thread_top_init(char *thread_name,
|
|||||||
/* Enable CPU Affinity only if number of CPUs > 2 */
|
/* Enable CPU Affinity only if number of CPUs > 2 */
|
||||||
CPU_ZERO(&cpuset);
|
CPU_ZERO(&cpuset);
|
||||||
|
|
||||||
#ifdef CPU_AFFINITY
|
|
||||||
if (affinity == 0) {
|
|
||||||
LOG_W(HW,"thread_top_init() called with affinity==0, but overruled by #ifdef CPU_AFFINITY\n");
|
|
||||||
}
|
|
||||||
else if (get_nprocs() > 2)
|
|
||||||
{
|
|
||||||
for (j = 2; j < get_nprocs(); j++)
|
|
||||||
CPU_SET(j, &cpuset);
|
|
||||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
|
||||||
if (s != 0)
|
|
||||||
{
|
|
||||||
perror( "pthread_setaffinity_np");
|
|
||||||
exit_fun("Error setting processor affinity");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else //CPU_AFFINITY
|
|
||||||
if (affinity) {
|
|
||||||
LOG_W(HW,"thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.\n");
|
|
||||||
}
|
|
||||||
#endif //CPU_AFFINITY
|
|
||||||
|
|
||||||
/* Check the actual affinity mask assigned to the thread */
|
/* Check the actual affinity mask assigned to the thread */
|
||||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||||
if (s != 0)
|
if (s != 0)
|
||||||
@@ -384,8 +341,6 @@ void thread_top_init(char *thread_name,
|
|||||||
"???",
|
"???",
|
||||||
sparam.sched_priority, cpu_affinity );
|
sparam.sched_priority, cpu_affinity );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //LOW_LATENCY
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -121,11 +121,6 @@ char toksep[2];
|
|||||||
case SCHED_RR:
|
case SCHED_RR:
|
||||||
lptr+=sprintf(lptr,"%s ","rt: rr");
|
lptr+=sprintf(lptr,"%s ","rt: rr");
|
||||||
break;
|
break;
|
||||||
#ifdef SCHED_DEADLINE
|
|
||||||
case SCHED_DEADLINE:
|
|
||||||
lptr+=sprintf(lptr,"%s ","rt: deadline");
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
lptr+=sprintf(lptr,"%s ","????");
|
lptr+=sprintf(lptr,"%s ","????");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -343,7 +343,6 @@ Initializing RU threads
|
|||||||
[0m[0m[PHY] Starting RU 0 (eNodeB_3GPP,synch_to_ext_device),
|
[0m[0m[PHY] Starting RU 0 (eNodeB_3GPP,synch_to_ext_device),
|
||||||
[0mwaiting for sync (ru_thread,-1/0xff4968,0x17af520,0x16952a0)
|
[0mwaiting for sync (ru_thread,-1/0xff4968,0x17af520,0x16952a0)
|
||||||
channel 0, Setting tx_gain offset 0.000000, rx_gain offset 118.000000, tx_freq 2680000000.000000, rx_freq 2560000000.000000
|
channel 0, Setting tx_gain offset 0.000000, rx_gain offset 118.000000, tx_freq 2680000000.000000, rx_freq 2560000000.000000
|
||||||
[0m[93m[HW] thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.
|
|
||||||
[0m[0m[PHY] Initializing frame parms for N_RB_DL 25, Ncp 0, osf 1
|
[0m[0m[PHY] Initializing frame parms for N_RB_DL 25, Ncp 0, osf 1
|
||||||
[0m[0m[PHY] lte_parms.c: Setting N_RB_DL to 25, ofdm_symbol_size 512
|
[0m[0m[PHY] lte_parms.c: Setting N_RB_DL to 25, ofdm_symbol_size 512
|
||||||
[0m[0m[PHY] Initializing RU signal buffers (if_south local RF) nb_tx 1
|
[0m[0m[PHY] Initializing RU signal buffers (if_south local RF) nb_tx 1
|
||||||
@@ -624,10 +623,8 @@ cnx_id 1 assoc_id 904
|
|||||||
[0m[0m[PHY] init_eNB_proc(inst:0) RC.nb_CC[inst]:1
|
[0m[0m[PHY] init_eNB_proc(inst:0) RC.nb_CC[inst]:1
|
||||||
[0m[0m[PHY] Initializing eNB processes instance:0 CC_id 0
|
[0m[0m[PHY] Initializing eNB processes instance:0 CC_id 0
|
||||||
[0m[0m[PHY] eNB->single_thread_flag:0
|
[0m[0m[PHY] eNB->single_thread_flag:0
|
||||||
[0m[0m[93m[HW] thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.
|
|
||||||
[0m[0m[HW] [SCHED][eNB] eNB_thread_prach started on CPU 0, sched_policy = SCHED_FIFO , priority = 99, CPU Affinity= CPU_0 CPU_1 CPU_2 CPU_3
|
[0m[0m[HW] [SCHED][eNB] eNB_thread_prach started on CPU 0, sched_policy = SCHED_FIFO , priority = 99, CPU Affinity= CPU_0 CPU_1 CPU_2 CPU_3
|
||||||
[0m[0m[ENB_APP] ALL RUs ready - ALL eNBs ready
|
[0m[0m[ENB_APP] ALL RUs ready - ALL eNBs ready
|
||||||
[0m[0m[93m[HW] thread_top_init() called with affinity>0, but overruled by #ifndef CPU_AFFINITY.
|
|
||||||
[0m[0m[HW] [SCHED][eNB] eNB_thread_prach_br started on CPU 0, sched_policy = SCHED_FIFO , priority = 99, CPU Affinity= CPU_0 CPU_1 CPU_2 CPU_3
|
[0m[0m[HW] [SCHED][eNB] eNB_thread_prach_br started on CPU 0, sched_policy = SCHED_FIFO , priority = 99, CPU Affinity= CPU_0 CPU_1 CPU_2 CPU_3
|
||||||
[0m[0m[ENB_APP] Sending sync to all threads
|
[0m[0m[ENB_APP] Sending sync to all threads
|
||||||
[0m[0m[MME_APP] Creating MME_APP eNB Task
|
[0m[0m[MME_APP] Creating MME_APP eNB Task
|
||||||
@@ -1908,4 +1905,4 @@ len = 336
|
|||||||
[0m[0m[X2AP] X2 has 1 process ongoing
|
[0m[0m[X2AP] X2 has 1 process ongoing
|
||||||
[0m[0m[X2AP] X2 has 1 process ongoing
|
[0m[0m[X2AP] X2 has 1 process ongoing
|
||||||
[0m[0m[X2AP] X2 has 1 process ongoing
|
[0m[0m[X2AP] X2 has 1 process ongoing
|
||||||
[0m
|
[0m
|
||||||
|
|||||||
@@ -917,14 +917,6 @@ void init_eNB_proc(int inst) {
|
|||||||
pthread_mutex_init( &proc->mutex_RU_PRACH_br,NULL);
|
pthread_mutex_init( &proc->mutex_RU_PRACH_br,NULL);
|
||||||
pthread_cond_init( &proc->cond_prach_br, NULL);
|
pthread_cond_init( &proc->cond_prach_br, NULL);
|
||||||
pthread_attr_init( &proc->attr_prach_br);
|
pthread_attr_init( &proc->attr_prach_br);
|
||||||
#ifndef DEADLINE_SCHEDULER
|
|
||||||
attr0 = &L1_proc->attr;
|
|
||||||
attr1 = &L1_proc_tx->attr;
|
|
||||||
attr_prach = &proc->attr_prach;
|
|
||||||
attr_prach_br = &proc->attr_prach_br;
|
|
||||||
// attr_td = &proc->attr_td;
|
|
||||||
// attr_te = &proc->attr_te;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(get_thread_worker_conf() == WORKER_ENABLE) {
|
if(get_thread_worker_conf() == WORKER_ENABLE) {
|
||||||
init_te_thread(eNB);
|
init_te_thread(eNB);
|
||||||
|
|||||||
@@ -2277,15 +2277,6 @@ void init_RU_proc(RU_t *ru) {
|
|||||||
pthread_mutex_init( &proc->mutex_rf_tx, NULL);
|
pthread_mutex_init( &proc->mutex_rf_tx, NULL);
|
||||||
pthread_cond_init( &proc->cond_rf_tx, NULL);
|
pthread_cond_init( &proc->cond_rf_tx, NULL);
|
||||||
#endif
|
#endif
|
||||||
#ifndef DEADLINE_SCHEDULER
|
|
||||||
attr_FH = &proc->attr_FH;
|
|
||||||
attr_FH1 = &proc->attr_FH1;
|
|
||||||
attr_prach = &proc->attr_prach;
|
|
||||||
attr_synch = &proc->attr_synch;
|
|
||||||
attr_asynch = &proc->attr_asynch_rxtx;
|
|
||||||
attr_emulateRF = &proc->attr_emulateRF;
|
|
||||||
attr_prach_br = &proc->attr_prach_br;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ru->has_ctrl_prt == 1) pthread_create( &proc->pthread_ctrl, attr_ctrl, ru_thread_control, (void*)ru );
|
if (ru->has_ctrl_prt == 1) pthread_create( &proc->pthread_ctrl, attr_ctrl, ru_thread_control, (void*)ru );
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -203,22 +203,6 @@ void init_thread(int sched_runtime,
|
|||||||
int sched_fifo,
|
int sched_fifo,
|
||||||
cpu_set_t *cpuset,
|
cpu_set_t *cpuset,
|
||||||
char *name) {
|
char *name) {
|
||||||
#ifdef DEADLINE_SCHEDULER
|
|
||||||
|
|
||||||
if (sched_runtime!=0) {
|
|
||||||
struct sched_attr attr= {0};
|
|
||||||
attr.size = sizeof(attr);
|
|
||||||
attr.sched_policy = SCHED_DEADLINE;
|
|
||||||
attr.sched_runtime = sched_runtime;
|
|
||||||
attr.sched_deadline = sched_deadline;
|
|
||||||
attr.sched_period = 0;
|
|
||||||
AssertFatal(sched_setattr(0, &attr, 0) == 0,
|
|
||||||
"[SCHED] %s thread: sched_setattr failed %s \n", name, strerror(errno));
|
|
||||||
LOG_I(HW,"[SCHED][eNB] %s deadline thread %lu started on CPU %d\n",
|
|
||||||
name, (unsigned long)gettid(), sched_getcpu());
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
int settingPriority = 1;
|
int settingPriority = 1;
|
||||||
|
|
||||||
if (checkIfFedoraDistribution())
|
if (checkIfFedoraDistribution())
|
||||||
@@ -250,7 +234,6 @@ void init_thread(int sched_runtime,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CPU_FREE(cset);
|
CPU_FREE(cset);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_UE(int nb_inst,
|
void init_UE(int nb_inst,
|
||||||
|
|||||||
Reference in New Issue
Block a user