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
lizhongxiao
OpenXG-RAN
Commits
d3b0b90f
Commit
d3b0b90f
authored
Feb 02, 2024
by
Eurecom
Committed by
mir
Feb 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
POLL and Sleep tunned
parent
68cd71b7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
common/utils/task_manager/threadPool/thread-pool.c
common/utils/task_manager/threadPool/thread-pool.c
+2
-1
common/utils/task_manager/thread_pool/task_manager.c
common/utils/task_manager/thread_pool/task_manager.c
+6
-3
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+6
-6
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+6
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+0
-8
No files found.
common/utils/task_manager/threadPool/thread-pool.c
View file @
d3b0b90f
...
@@ -198,7 +198,8 @@ void init_sq_task_manager(tpool_t *pool, int* lst, size_t num_threads)
...
@@ -198,7 +198,8 @@ void init_sq_task_manager(tpool_t *pool, int* lst, size_t num_threads)
assert
(
it
<
1024
);
assert
(
it
<
1024
);
bool
performanceMeas
=
false
;
bool
performanceMeas
=
false
;
char
name
[]
=
"single_queue_thread_pool"
;
// Single Queue thread pool
char
name
[]
=
"sq_TPool-"
;
initNamedTpool
(
str
,
pool
,
performanceMeas
,
name
);
initNamedTpool
(
str
,
pool
,
performanceMeas
,
name
);
}
}
...
...
common/utils/task_manager/thread_pool/task_manager.c
View file @
d3b0b90f
...
@@ -356,20 +356,23 @@ bool pop_not_q(not_q_t* q, ret_try_t* out)
...
@@ -356,20 +356,23 @@ bool pop_not_q(not_q_t* q, ret_try_t* out)
assert
(
rc
==
0
);
assert
(
rc
==
0
);
assert
(
q
->
done
==
0
||
q
->
done
==
1
);
assert
(
q
->
done
==
0
||
q
->
done
==
1
);
// printf("Sleeping idx %ld %ld \n", q->idx, time_now_us());
const
struct
timespec
ns
=
{
0
,
1
024
};
const
struct
timespec
ns
=
{
0
,
1
};
int
cnt
=
0
;
int
cnt
=
0
;
while
(
size_seq_ring_task
(
&
q
->
r
)
==
0
&&
q
->
done
==
0
){
while
(
size_seq_ring_task
(
&
q
->
r
)
==
0
&&
q
->
done
==
0
){
rc
=
pthread_mutex_unlock
(
&
q
->
mtx
);
rc
=
pthread_mutex_unlock
(
&
q
->
mtx
);
assert
(
rc
==
0
);
assert
(
rc
==
0
);
cnt
++
;
if
(
cnt
%
64
)
nanosleep
(
&
ns
,
NULL
);
nanosleep
(
&
ns
,
NULL
);
int
rc
=
pthread_mutex_lock
(
&
q
->
mtx
);
int
rc
=
pthread_mutex_lock
(
&
q
->
mtx
);
assert
(
rc
==
0
);
assert
(
rc
==
0
);
if
(
cnt
==
1024
){
if
(
cnt
==
4
*
1024
){
cnt
=
0
;
cnt
=
0
;
pthread_cond_wait
(
&
q
->
cv
,
&
q
->
mtx
);
pthread_cond_wait
(
&
q
->
cv
,
&
q
->
mtx
);
}
}
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
d3b0b90f
...
@@ -336,9 +336,9 @@ void nr_feptx_tp(RU_t *ru, int frame_tx, int slot) {
...
@@ -336,9 +336,9 @@ void nr_feptx_tp(RU_t *ru, int frame_tx, int slot) {
start_meas
(
&
ru
->
ofdm_total_stats
);
start_meas
(
&
ru
->
ofdm_total_stats
);
size_t
const
sz
=
ru
->
nb_tx
+
(
ru
->
half_slot_parallelization
>
0
)
*
ru
->
nb_tx
;
size_t
const
sz
=
ru
->
nb_tx
+
(
ru
->
half_slot_parallelization
>
0
)
*
ru
->
nb_tx
;
feptx_cmd_t
arr
[
sz
];
assert
(
sz
<
64
&&
"Please, increase the buffer size"
);
task_ans_t
ans
[
sz
];
feptx_cmd_t
arr
[
64
]
=
{
0
};
memset
(
ans
,
0
,
sz
*
sizeof
(
task_ans_t
))
;
task_ans_t
ans
[
64
]
=
{
0
}
;
int
nbfeptx
=
0
;
int
nbfeptx
=
0
;
for
(
int
aid
=
0
;
aid
<
ru
->
nb_tx
;
aid
++
)
{
for
(
int
aid
=
0
;
aid
<
ru
->
nb_tx
;
aid
++
)
{
...
@@ -414,9 +414,9 @@ void nr_fep_tp(RU_t *ru, int slot) {
...
@@ -414,9 +414,9 @@ void nr_fep_tp(RU_t *ru, int slot) {
start_meas
(
&
ru
->
ofdm_demod_stats
);
start_meas
(
&
ru
->
ofdm_demod_stats
);
size_t
const
sz
=
ru
->
nb_rx
+
(
ru
->
half_slot_parallelization
>
0
)
*
ru
->
nb_rx
;
size_t
const
sz
=
ru
->
nb_rx
+
(
ru
->
half_slot_parallelization
>
0
)
*
ru
->
nb_rx
;
feprx_cmd_t
arr
[
sz
];
assert
(
sz
<
64
&&
"Please, increase buffer size"
);
task_ans_t
ans
[
sz
];
feprx_cmd_t
arr
[
64
]
=
{
0
};
memset
(
&
ans
,
0
,
sz
*
sizeof
(
task_ans_t
))
;
task_ans_t
ans
[
64
]
=
{
0
}
;
for
(
int
aid
=
0
;
aid
<
ru
->
nb_rx
;
aid
++
)
{
for
(
int
aid
=
0
;
aid
<
ru
->
nb_rx
;
aid
++
)
{
feprx_cmd_t
*
feprx_cmd
=
&
arr
[
nbfeprx
];
feprx_cmd_t
*
feprx_cmd
=
&
arr
[
nbfeprx
];
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
d3b0b90f
...
@@ -554,8 +554,12 @@ int main(int argc, char *argv[])
...
@@ -554,8 +554,12 @@ int main(int argc, char *argv[])
gNB
->
ofdm_offset_divisor
=
UINT_MAX
;
gNB
->
ofdm_offset_divisor
=
UINT_MAX
;
gNB
->
num_pusch_symbols_per_thread
=
1
;
gNB
->
num_pusch_symbols_per_thread
=
1
;
int
lst_core_id
[
32
]
=
{
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
};
const
int
max_cid
=
32
;
assert
(
threadCnt
<
33
);
int
lst_core_id
[
max_cid
];
for
(
int
i
=
0
;
i
<
max_cid
;
++
i
){
lst_core_id
[
i
]
=
-
1
;
}
assert
(
threadCnt
<
max_cid
);
init_task_manager
(
&
gNB
->
man
,
lst_core_id
,
max
(
threadCnt
,
1
));
init_task_manager
(
&
gNB
->
man
,
lst_core_id
,
max
(
threadCnt
,
1
));
initNotifiedFIFO
(
&
gNB
->
respDecode
);
initNotifiedFIFO
(
&
gNB
->
respDecode
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
d3b0b90f
...
@@ -326,14 +326,6 @@ static int nr_process_mac_pdu(instance_t module_idP,
...
@@ -326,14 +326,6 @@ static int nr_process_mac_pdu(instance_t module_idP,
}
}
}
}
// Spin if not ready. This is a bad bad bad solution even in x86
const
struct
timespec
ns
=
{
0
,
1024
};
int
cnt
=
0
;
while
(
UE_idx
->
CellGroup
==
NULL
&&
cnt
<
64
){
nanosleep
(
&
ns
,
NULL
);
cnt
++
;
}
if
(
UE_idx
->
CellGroup
)
{
if
(
UE_idx
->
CellGroup
)
{
LOG_D
(
NR_MAC
,
"Frame %d : ULSCH -> UL-DCCH %d (gNB %ld, %d bytes), rnti: 0x%04x
\n
"
,
frameP
,
rx_lcid
,
module_idP
,
mac_len
,
crnti
);
LOG_D
(
NR_MAC
,
"Frame %d : ULSCH -> UL-DCCH %d (gNB %ld, %d bytes), rnti: 0x%04x
\n
"
,
frameP
,
rx_lcid
,
module_idP
,
mac_len
,
crnti
);
UE
->
mac_stats
.
ul
.
total_sdu_bytes
+=
mac_len
;
UE
->
mac_stats
.
ul
.
total_sdu_bytes
+=
mac_len
;
...
...
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