Attention is currently required from: pespin.
pespin uploaded patch set #3 to this change.
Avoid counting lchan->dl_tch_queue length every time a msg is enqueued
The queue_limit_to method iterates the entire list of messages every
time a new message is added. Let's use msgb_{enqueue,dequeue}_count()
APIs to do that in constant time. It is true that since the queue is
limited to 1, there's usually at most 1 item in the queue so it's not a
real problem. However, when we add Osmux in the future, we may need to
tweak the amount of messages which can be in the list, due to Osmux
batching mechansim which may be more bursty sometimes.
In any case, this change doesn't make things worse for sure.
The patch also takes the chance to group the queue_limit_to + enqueue
into one function to avoid having the code spread several times.
Change-Id: I61818a3bb521c27bd21a8b6fa70581d27638ec9b
---
M include/osmo-bts/lchan.h
M src/common/l1sap.c
M src/common/lchan.c
3 files changed, 16 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/34/29034/3
To view, visit change 29034. To unsubscribe, or for help writing mail filters, visit settings.