Attention is currently required from: fixeria, laforge, neels.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/36538?usp=email )
Change subject: add osmo_stats_report_lock api
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
pespin says use intermediate storage with mutexes in a
comment at
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36385
For this one, my aim was to say that osmo-trx is doing it that way, not that you should do
it that way.
nhofmeyr says directly write to rate_ctr, but still
have a mutex around stats reporting, so that counter pairs are always in sync.
If you plan on keep the mutex locked while you gather counters from nft, that's a no
go for me, you are locking access to rate_ctr/stat for a long period of time, most
probably blocking the main thread also for the same amount of time.
If you plan to gather counters locally, then lock() then update/copy them to
rate_ctr/stats then unlock(), this can be more acceptable and it's basically the
option mentioned first quoted in this comment. Still, I think it's better going for
osmo_itq to avoid problems accessing rate_ctr infrastructure (llist, etc.) which means
you'd need to lock() unlock() everytime you want to update a metric, which is
overkill.
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/36538?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib335bea7d2a440ca284e6c439066f96456bf2c2d
Gerrit-Change-Number: 36538
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 10 Apr 2024 08:38:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment