Change in osmo-bsc[master]: add stat_items for BTS and TRX connection stati

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at

neels gerrit-no-reply at
Mon Aug 30 16:36:40 UTC 2021

neels has posted comments on this change. ( )

Change subject: add stat_items for BTS and TRX connection stati

Patch Set 2:

File src/osmo-bsc/bsc_stats.c: 
PS1, Line 156: 			if (trx_is_usable(trx))
> Ah good point, I didn't think about trx_is_usable being a complex function :)
trx_is_usable() is absolutely not worth optimizing to avoid it.
It's just a shallow cascade of plain if()s and checking FSM status.
no point in nano optimisation here at all. 
File src/osmo-bsc/osmo_bsc_main.c: 
PS2, Line 385:  * that should call this and failed to get accurate results; this trivial timer covers all of them. */
@pespin, you've seen this comment, right?

i really tried to find pivotal places in the code where to trigger updating the conn stats, but it's apparently a bit obscure. I spent considerable time on it, and then gave up because it was becoming a waste of time. This periodic check trivially covers all corner cases.

Doing this once a second cannot be considered load. We do much more effort every time we look up a trx, a conn, a subscriber, an unused lchan... on each and every incoming message.

In general, please let's not discuss processor time optimization for algorithms <= O(n), it's plain irrelevant. If we want optimization, the first step should be benchmarked load testing; then we can focus on the actual proven CPU hogs. This is O(n) with n much smaller than 1k, run once every second. I took longer writing this comment than any osmo-bsc will take running this timer cb for the next ten years combined.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2057a798e681a169cc03243a09b3d6449734c010
Gerrit-Change-Number: 25274
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-Comment-Date: Mon, 30 Aug 2021 16:36:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith at>
Comment-In-Reply-To: pespin <pespin at>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list