Attention is currently required from: daniel, fixeria, laforge, osmith, pespin.

pespin uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Verified-1 by Jenkins Builder

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 change 41865. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268
Gerrit-Change-Number: 41865
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Attention: osmith <osmith@sysmocom.de>
Gerrit-Attention: laforge <laforge@osmocom.org>
Gerrit-Attention: pespin <pespin@sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Attention: daniel <dwillmann@sysmocom.de>