Commit e2305bff authored by Cedric Roux's avatar Cedric Roux Committed by masayuki.harada

hotfix: better CQI requests, especially for TDD

In TDD mode, CQI requests are not possible in special subframes (at
least for some TDD configurations, see 36.213 7.2.3 that says "a
DL subframe is valid if it does not contain a DwPTS field if the
length is less than  7680 Ts").

In the code, we simply disable CQI requests in special subframes,
no matter what the length of DwPTS.

A problem can arise if the DCI0 for a given UE are sent only in
those special subframes. In this case the UE will never report
CQI and the eNB will use low MCS for this UE, impacting performances.

Another, related, problem is when there are several UEs. There again
one UE might always get its DCI0 in special subframes and thus never
report CQI. There again, performance issues.

This commit is an attempt to improve the situation.

It does two things.

1 - tag the UE as schedulable in the function UE_is_to_be_scheduled
    if the cqi_req_timer is expired

2 - use cqi_req_timer as a criterium when ordering UEs for UL scheduling

The value chosen for the expiration of the cqi_req_timer in
UE_is_to_be_scheduled is quite high (300) because as the code is
today we may overschedule the UE for short bursts until we receive
a CQI from the UE. [TODO: fix the code properly to avoid this behavior.]

Note: the fairRR scheduler has not been analyzed and this commit may
      not fix anything in case the fairRR scheduler is used.
parent 7af84127
...@@ -2523,6 +2523,7 @@ UE_is_to_be_scheduled(module_id_t module_idP, ...@@ -2523,6 +2523,7 @@ UE_is_to_be_scheduled(module_id_t module_idP,
{ {
UE_TEMPLATE *UE_template = &RC.mac[module_idP]->UE_list.UE_template[CC_id][UE_id]; UE_TEMPLATE *UE_template = &RC.mac[module_idP]->UE_list.UE_template[CC_id][UE_id];
UE_sched_ctrl_t *UE_sched_ctl = &RC.mac[module_idP]->UE_list.UE_sched_ctrl[UE_id]; UE_sched_ctrl_t *UE_sched_ctl = &RC.mac[module_idP]->UE_list.UE_sched_ctrl[UE_id];
int rrc_status;
// do not schedule UE if UL is not working // do not schedule UE if UL is not working
if (UE_sched_ctl->ul_failure_timer > 0 || UE_sched_ctl->ul_out_of_sync > 0) if (UE_sched_ctl->ul_failure_timer > 0 || UE_sched_ctl->ul_out_of_sync > 0)
...@@ -2535,13 +2536,14 @@ UE_is_to_be_scheduled(module_id_t module_idP, ...@@ -2535,13 +2536,14 @@ UE_is_to_be_scheduled(module_id_t module_idP,
UE_id, UE_id,
ue_rnti); ue_rnti);
rrc_status = mac_eNB_get_rrc_status(module_idP, ue_rnti);
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer || if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
UE_template->ul_SR > 0 || // uplink scheduling request UE_template->ul_SR > 0 || // uplink scheduling request
(UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED (UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
(UE_sched_ctl->ul_inactivity_timer > 10 && (UE_sched_ctl->ul_inactivity_timer > 10 &&
UE_sched_ctl->ul_scheduled == 0 && UE_sched_ctl->ul_scheduled == 0 && rrc_status < RRC_CONNECTED) || // every Frame when not RRC_CONNECTED
mac_eNB_get_rrc_status(module_idP, (UE_sched_ctl->cqi_req_timer > 300 && rrc_status >= RRC_CONNECTED)) { // cqi req timer expired long ago (do not put too low value)
ue_rnti) < RRC_CONNECTED)) { // every Frame when not RRC_CONNECTED
LOG_D(MAC, "[eNB %d][PUSCH] UE %d/%x should be scheduled (BSR0 estimated size %d, SR %d)\n", LOG_D(MAC, "[eNB %d][PUSCH] UE %d/%x should be scheduled (BSR0 estimated size %d, SR %d)\n",
module_idP, module_idP,
UE_id, UE_id,
......
...@@ -2024,6 +2024,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params) { ...@@ -2024,6 +2024,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params) {
UE_list->UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul) UE_list->UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul)
return 1; return 1;
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer >
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
return -1;
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer <
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
return 1;
return 0; return 0;
} }
......
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