tbf/sched: We pick the _last_ entry, rotate the lists
We always pick the _last_ entry from the lists. Let's rotate so we make it a bit more fair.
This commit is contained in:
parent
7f3e662b34
commit
7a5f3c2153
|
@ -133,6 +133,7 @@ static struct msgb *sched_select_ctrl_msg(struct gprs_rlcmac_bts *bts,
|
|||
}
|
||||
/* any message */
|
||||
if (msg) {
|
||||
tbf->rotate_in_list();
|
||||
LOGP(DRLCMACSCHED, LOGL_DEBUG, "Scheduling control "
|
||||
"message at RTS for %s (TRX=%d, TS=%d)\n",
|
||||
tbf_name(tbf), trx, ts);
|
||||
|
|
|
@ -1742,3 +1742,12 @@ bool gprs_rlcmac_tbf::dl_window_stalled() const
|
|||
{
|
||||
return dir.dl.window.window_stalled();
|
||||
}
|
||||
|
||||
void gprs_rlcmac_tbf::rotate_in_list()
|
||||
{
|
||||
llist_del(&list);
|
||||
if (direction == GPRS_RLCMAC_UL_TBF)
|
||||
llist_add(&list, &bts->bts_data()->ul_tbfs);
|
||||
else
|
||||
llist_add(&list, &bts->bts_data()->dl_tbfs);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue