Attention is currently required from: pespin. Hello Jenkins Builder, laforge, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/29034
to look at the new patch set (#3).
Change subject: Avoid counting lchan->dl_tch_queue length every time a msg is enqueued ......................................................................
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