Fairness of sched_poll

Holger Hans Peter Freyther hfreyther at sysmocom.de
Thu Oct 17 09:44:11 UTC 2013


Good Morning,

sched_poll is doing:

        llist_for_each_entry(tbf, &gprs_rlcmac_ul_tbfs, list) {
                /* this trx, this ts */
                if (tbf->trx_no != trx || tbf->control_ts != ts)
                        continue;
                /* polling for next uplink block */
                if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED
                 && tbf->poll_fn == poll_fn)
                        *poll_tbf = tbf;
                if (tbf->ul_ack_state == GPRS_RLCMAC_UL_ACK_SEND_ACK)
                        *ul_ack_tbf = tbf;
                if (tbf->dl_ass_state == GPRS_RLCMAC_DL_ASS_SEND_ASS)
                        *dl_ass_tbf = tbf;
                if (tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS)
                        *ul_ass_tbf = tbf;
        }
        llist_for_each_entry(tbf, &gprs_rlcmac_dl_tbfs, list) {
                /* this trx, this ts */
                if (tbf->trx_no != trx || tbf->control_ts != ts)
                        continue;
                /* polling for next uplink block */
                if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED
                 && tbf->poll_fn == poll_fn)
                        *poll_tbf = tbf;
                if (tbf->dl_ass_state == GPRS_RLCMAC_DL_ASS_SEND_ASS)
                        *dl_ass_tbf = tbf;
                if (tbf->ul_ass_state == GPRS_RLCMAC_UL_ASS_SEND_ASS)
                        *ul_ass_tbf = tbf;
        }


New tbf's will be added to the front (llist_add). Is it on purpose
that the dl_tbfs are preferred over ul_tbfs and that the last of
each tbf's will be found? What is the reasoning for this? What will
collect/catch poll_fn's that are in the past?

holger

-- 
- Holger Freyther <hfreyther at sysmocom.de>       http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Schivelbeiner Str. 5
* 10439 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte





More information about the osmocom-net-gprs mailing list