Attention is currently required from: daniel, fixeria, laforge, osmith, pespin.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: gmstap_log: optimization: Add talloc_pool for transmitted messages
......................................................................
gmstap_log: optimization: Add talloc_pool for transmitted messages
In synchronous modes (blocking and non-blocking), set a pool size of 1
msgb. This way we avoid re-allocating the msgb with malloc/free
everytime a gsmtap_log msg is transmitted over the target, and instead
we allocate the msgb during creation of the target.
In asynchronous mode (workqueue), create a pool of 100 msgbs, which
should in general be enough to speedup more usual needs. If more than
100 msgbs are to be enqueued into the gsmtap_inst, then they will be
allocated as normal talloc contexts.
Since the struct log_target is public, it is currently not possible to
add new fields to it under "tgt_gsmtap" without breaking the ABI. Hence,
the ->output field, which is unused in this target, is reused to store
the pool object internally.
Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
---
M src/core/logging_gsmtap.c
1 file changed, 30 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/41865/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
Gerrit-Change-Number: 41865
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith, pespin.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: gmstap_log: optimization: Add talloc_pool for transmitted messages
......................................................................
gmstap_log: optimization: Add talloc_pool for transmitted messages
In synchronous modes (blocking and non-blocking), set a pool size of 1
msgb. This way we avoid re-allocating the msgb with malloc/free
everytime a gsmtap_log msg is transmitted over the target, and instead
we allocate the msgb during creation of the target.
In asynchronous mode (workqueue), create a pool of 100 msgbs, which
should in general be enough to speedup more usual needs. If more than
100 msgbs are to be enqueued into the gsmtap_inst, then they will be
allocated as normal talloc contexts.
Since the struct log_target is public, it is currently not possible to
add new fields to it under "tgt_gsmtap" without breaking the ABI. Hence,
the ->output field, which is unused in this target, is reused to store
the pool object internally.
Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
---
M src/core/logging_gsmtap.c
1 file changed, 32 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/41865/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
Gerrit-Change-Number: 41865
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith, pespin.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: gmstap_log: optimization: Add talloc_pool for transmitted messages
......................................................................
gmstap_log: optimization: Add talloc_pool for transmitted messages
In synchronous modes (blocking and non-blocking), set a pool size of 1
msgb. This way we avoid re-allocating the msgb with malloc/free
everytime a gsmtap_log msg is transmitted over the target, and instead
we allocate the msgb during creation of the target.
In asynchronous mode (workqueue), create a pool of 100 msgbs, which
should in general be enough to speedup more usual needs. If more than
100 msgbs are to be enqueued into the gsmtap_inst, then they will be
allocated as normal talloc contexts.
Since the struct log_target is public, it is currently not possible to
add new fields to it under "tgt_gsmtap" without breaking the ABI. Hence,
the ->output field, which is unused in this target, is reused to store
the pool object internally.
Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
---
M src/core/logging_gsmtap.c
1 file changed, 32 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/41865/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
Gerrit-Change-Number: 41865
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41864?usp=email )
Change subject: logging: Improve syslog log documentation
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> we might also implement a threaded syslog target to keep users safe rather than having to consider t […]
I think it's fine leaving it as an option since some osmocom program may actually be fine with blocking in those kind of scenarios (eg. non interactive program with no latency constrains).
Also, if used to log NOTICE|ERROR|FATAL it shouldn't be a problem usually, which is what usually one would like to log over syslog.
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41864?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ic3ab275fd1448e590a43251e226d690beee67004
Gerrit-Change-Number: 41864
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 16 Jan 2026 17:39:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: daniel, fixeria, osmith, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41864?usp=email )
Change subject: logging: Improve syslog log documentation
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
we might also implement a threaded syslog target to keep users safe rather than having to consider this. Or alternatively simply deprecate the sysylog target as it is not really compatible with our non-blocking select-loop driven approach.
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41864?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ic3ab275fd1448e590a43251e226d690beee67004
Gerrit-Change-Number: 41864
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 16 Jan 2026 17:36:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email )
Change subject: gmstap_log: optimization: Add talloc_pool for transmitted messages
......................................................................
gmstap_log: optimization: Add talloc_pool for transmitted messages
In synchronous modes (blocking and non-blocking), set a pool size of 1
msgb. This way we avoid re-allocating the msgb with malloc/free
everytime a gsmtap_log msg is transmitted over the target, and instead
we allocate the msgb during creation of the target.
In asynchronous mode (workqueue), create a pool of 100 msgbs, which
should in general be enough to speedup more usual needs. If more than
100 msgbs are to be enqueued into the gsmtap_inst, then they will be
allocated as normal talloc contexts.
Since the struct log_target is public, it is currently not possible to
add new fields to it under "tgt_gsmtap" without breaking the ABI. Hence,
the ->output field, which is unused in this target, is reused to store
the pool object internally.
Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
---
M src/core/logging_gsmtap.c
1 file changed, 25 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/41865/1
diff --git a/src/core/logging_gsmtap.c b/src/core/logging_gsmtap.c
index 7775c27..ed810ed 100644
--- a/src/core/logging_gsmtap.c
+++ b/src/core/logging_gsmtap.c
@@ -50,6 +50,9 @@
#include <osmocom/core/thread.h>
#define GSMTAP_LOG_MAX_SIZE 4096
+#define GSMTAP_MSG_MAX_SIZE (sizeof(struct gsmtap_hdr) + \
+ sizeof(struct gsmtap_osmocore_log_hdr) + \
+ GSMTAP_LOG_MAX_SIZE)
static __thread uint32_t logging_gsmtap_tid;
@@ -70,8 +73,8 @@
/* get timestamp ASAP */
osmo_gettimeofday(&tv, NULL);
- msg = msgb_alloc(sizeof(*gh)+sizeof(*golh)+GSMTAP_LOG_MAX_SIZE,
- "GSMTAP logging");
+
+ msg = msgb_alloc_c((void *)target->output, GSMTAP_MSG_MAX_SIZE, "GSMTAP logging");
/* GSMTAP header */
gh = (struct gsmtap_hdr *) msgb_put(msg, sizeof(*gh));
@@ -139,6 +142,7 @@
{
struct log_target *target;
struct gsmtap_inst *gti;
+ size_t num_pool_objects;
target = log_target_create();
if (!target)
@@ -150,6 +154,25 @@
return NULL;
}
+ if (ofd_wq_mode) {
+ /* Allocate a talloc pool to avoid malloc() on the first 100
+ * concurrently queued msgbs (~400KB per gsmtap_log target).
+ * Once the talloc_pool is full, new normal talloc chunks will be used. */
+ num_pool_objects = 100;
+ } else {
+ /* When in synchronous mode (blocking & non-blocking), there's
+ * no queueing in gsmtap_sendmsg() so there's no need to have a
+ * pool with multiple msgbs. */
+ num_pool_objects = 1;
+ }
+ /* XXX: Abuse "output" field to store the talloc_pool, since it's not
+ * used in gsmtap log target. This can be moved to its own field once we
+ * make "sutrct log_target" private.
+ */
+ target->output = _talloc_pooled_object(target, 0, "gsmtap_log_msgb_pool",
+ num_pool_objects,
+ (sizeof(struct msgb) + GSMTAP_MSG_MAX_SIZE) * num_pool_objects);
+
if (add_sink)
gsmtap_source_add_sink(gti);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41865?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
Gerrit-Change-Number: 41865
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>