Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhouShuya
OpenXG-RAN
Commits
22911600
Commit
22911600
authored
Nov 24, 2017
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding measurment for waking up the thread
parent
6b99b1b1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
+35
-5
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+26
-4
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+4
-0
openair1/PHY/defs.h
openair1/PHY/defs.h
+3
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+2
-0
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
22911600
...
@@ -463,11 +463,14 @@ void *te_thread(void *param) {
...
@@ -463,11 +463,14 @@ void *te_thread(void *param) {
CPU_SET
(
4
,
&
cpuset
);
CPU_SET
(
4
,
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
eNB_proc_t
*
proc
=
&
((
te_params
*
)
param
)
->
eNB
->
proc
;
PHY_VARS_eNB
*
eNB
=
((
te_params
*
)
param
)
->
eNB
;
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
time_stats_t
*
te_wakeup_stats0
=
&
eNB
->
dlsch_turbo_encoding_wakeup_stats0
;
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
wait_on_condition
(
&
proc
->
mutex_te
[
0
],
&
proc
->
cond_te
[
0
],
&
proc
->
instance_cnt_te
[
0
],
"te thread"
)
<
0
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_te
[
0
],
&
proc
->
cond_te
[
0
],
&
proc
->
instance_cnt_te
[
0
],
"te thread"
)
<
0
)
break
;
stop_meas
(
te_wakeup_stats0
);
dlsch_encoding_2threads0
((
te_params
*
)
param
);
dlsch_encoding_2threads0
((
te_params
*
)
param
);
...
@@ -478,6 +481,10 @@ void *te_thread(void *param) {
...
@@ -478,6 +481,10 @@ void *te_thread(void *param) {
exit_fun
(
"ERROR pthread_cond_signal"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
NULL
);
return
(
NULL
);
}
}
if
(
opp_enabled
==
1
&&
te_wakeup_stats0
->
diff_now
>
50
*
3000
){
print_meas_now
(
te_wakeup_stats0
,
"coding_wakeup"
,
stderr
);
printf
(
"frame_rx: %d subframe_rx: %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
}
}
return
(
NULL
);
return
(
NULL
);
...
@@ -494,12 +501,15 @@ void *te_thread1(void *param) {
...
@@ -494,12 +501,15 @@ void *te_thread1(void *param) {
CPU_SET
(
7
,
&
cpuset
);
CPU_SET
(
7
,
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
eNB_proc_t
*
proc
=
&
((
te_params
*
)
param
)
->
eNB
->
proc
;
PHY_VARS_eNB
*
eNB
=
((
te_params
*
)
param
)
->
eNB
;
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
time_stats_t
*
te_wakeup_stats1
=
&
eNB
->
dlsch_turbo_encoding_wakeup_stats1
;
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
wait_on_condition
(
&
proc
->
mutex_te
[
1
],
&
proc
->
cond_te
[
1
],
&
proc
->
instance_cnt_te
[
1
],
"te thread 1"
)
<
0
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_te
[
1
],
&
proc
->
cond_te
[
1
],
&
proc
->
instance_cnt_te
[
1
],
"te thread 1"
)
<
0
)
break
;
stop_meas
(
te_wakeup_stats1
);
dlsch_encoding_2threads1
((
te_params
*
)
param
);
dlsch_encoding_2threads1
((
te_params
*
)
param
);
...
@@ -510,6 +520,10 @@ void *te_thread1(void *param) {
...
@@ -510,6 +520,10 @@ void *te_thread1(void *param) {
exit_fun
(
"ERROR pthread_cond_signal"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
NULL
);
return
(
NULL
);
}
}
if
(
opp_enabled
==
1
&&
te_wakeup_stats1
->
diff_now
>
50
*
3000
){
print_meas_now
(
te_wakeup_stats1
,
"coding_wakeup"
,
stderr
);
printf
(
"delay for waking up in frame_rx: %d subframe_rx: %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
}
}
return
(
NULL
);
return
(
NULL
);
...
@@ -524,6 +538,8 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
...
@@ -524,6 +538,8 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
)
time_stats_t
*
i_stats
)
{
{
...
@@ -591,6 +607,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
...
@@ -591,6 +607,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
exit_fun
(
"ERROR pthread_cond_signal"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
return
(
-
1
);
}
}
start_meas
(
te_wakeup_stats0
);
pthread_mutex_unlock
(
&
proc
->
mutex_te
[
0
]
);
pthread_mutex_unlock
(
&
proc
->
mutex_te
[
0
]
);
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
...
@@ -614,6 +631,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
...
@@ -614,6 +631,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
exit_fun
(
"ERROR pthread_cond_signal"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
return
(
-
1
);
}
}
start_meas
(
te_wakeup_stats1
);
pthread_mutex_unlock
(
&
proc
->
mutex_te
[
1
]
);
pthread_mutex_unlock
(
&
proc
->
mutex_te
[
1
]
);
...
@@ -727,7 +745,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
...
@@ -727,7 +745,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
stop_meas
(
te_wait_stats
);
stop_meas
(
te_wait_stats
);
if
(
opp_enabled
==
1
&&
te_wait_stats
->
diff_now
>
50
*
3000
){
if
(
opp_enabled
==
1
&&
te_wait_stats
->
diff_now
>
50
*
3000
){
print_meas_now
(
te_wait_stats
,
"coding_wait"
,
stderr
);
print_meas_now
(
te_wait_stats
,
"coding_wait"
,
stderr
);
printf
(
"frame_rx: %d subframe_rx: %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
printf
(
"
delay in wait on codition in
frame_rx: %d subframe_rx: %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
}
...
@@ -744,6 +762,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
...
@@ -744,6 +762,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
)
time_stats_t
*
i_stats
)
{
{
int
encoding_return
=
0
;
int
encoding_return
=
0
;
...
@@ -777,6 +797,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
...
@@ -777,6 +797,8 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
rm_stats
,
rm_stats
,
te_stats
,
te_stats
,
te_wait_stats
,
te_wait_stats
,
te_wakeup_stats0
,
te_wakeup_stats1
,
i_stats
);
i_stats
);
}
}
else
else
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
22911600
...
@@ -131,6 +131,8 @@ int32_t dlsch_encoding_all(PHY_VARS_eNB *eNB,
...
@@ -131,6 +131,8 @@ int32_t dlsch_encoding_all(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
);
time_stats_t
*
i_stats
);
int32_t
dlsch_encoding_SIC
(
PHY_VARS_UE
*
ue
,
int32_t
dlsch_encoding_SIC
(
PHY_VARS_UE
*
ue
,
...
@@ -177,6 +179,8 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
...
@@ -177,6 +179,8 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
);
time_stats_t
*
i_stats
);
void
dlsch_encoding_emul
(
PHY_VARS_eNB
*
phy_vars_eNB
,
void
dlsch_encoding_emul
(
PHY_VARS_eNB
*
phy_vars_eNB
,
...
...
openair1/PHY/defs.h
View file @
22911600
...
@@ -957,7 +957,7 @@ typedef struct PHY_VARS_eNB_s {
...
@@ -957,7 +957,7 @@ typedef struct PHY_VARS_eNB_s {
eth_params_t
eth_params
;
eth_params_t
eth_params
;
int
rx_total_gain_dB
;
int
rx_total_gain_dB
;
int
(
*
td
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
);
int
(
*
td
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
);
int
(
*
te
)(
struct
PHY_VARS_eNB_s
*
,
uint8_t
*
,
uint8_t
,
LTE_eNB_DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
);
int
(
*
te
)(
struct
PHY_VARS_eNB_s
*
,
uint8_t
*
,
uint8_t
,
LTE_eNB_DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
);
int
(
*
start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_eNB_s
*
eNB
);
int
(
*
start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_eNB_s
*
eNB
);
uint8_t
local_flag
;
uint8_t
local_flag
;
LTE_DL_FRAME_PARMS
frame_parms
;
LTE_DL_FRAME_PARMS
frame_parms
;
...
@@ -1137,6 +1137,8 @@ typedef struct PHY_VARS_eNB_s {
...
@@ -1137,6 +1137,8 @@ typedef struct PHY_VARS_eNB_s {
time_stats_t
dlsch_rate_matching_stats
;
time_stats_t
dlsch_rate_matching_stats
;
time_stats_t
dlsch_turbo_encoding_stats
;
time_stats_t
dlsch_turbo_encoding_stats
;
time_stats_t
dlsch_turbo_encoding_waiting_stats
;
time_stats_t
dlsch_turbo_encoding_waiting_stats
;
time_stats_t
dlsch_turbo_encoding_wakeup_stats0
;
time_stats_t
dlsch_turbo_encoding_wakeup_stats1
;
time_stats_t
dlsch_interleaving_stats
;
time_stats_t
dlsch_interleaving_stats
;
time_stats_t
rx_dft_stats
;
time_stats_t
rx_dft_stats
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
22911600
...
@@ -346,6 +346,8 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
...
@@ -346,6 +346,8 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
&
eNB
->
dlsch_rate_matching_stats
,
&
eNB
->
dlsch_rate_matching_stats
,
&
eNB
->
dlsch_turbo_encoding_stats
,
&
eNB
->
dlsch_turbo_encoding_stats
,
&
eNB
->
dlsch_turbo_encoding_waiting_stats
,
&
eNB
->
dlsch_turbo_encoding_waiting_stats
,
&
eNB
->
dlsch_turbo_encoding_wakeup_stats0
,
&
eNB
->
dlsch_turbo_encoding_wakeup_stats1
,
&
eNB
->
dlsch_interleaving_stats
);
&
eNB
->
dlsch_interleaving_stats
);
stop_meas
(
&
eNB
->
dlsch_encoding_stats
);
stop_meas
(
&
eNB
->
dlsch_encoding_stats
);
// 36-211
// 36-211
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment