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 https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/19107 ) Change subject: bts-trx: Introduce rate counter for scheduler timerfd missed FNs ...................................................................... bts-trx: Introduce rate counter for scheduler timerfd missed FNs This should provide a quick way to check if the system is frequently overloaded over time and hence downlink FNs are scheduled later than expected. Change-Id: I0051b9ab18ebc9f92db11374d856de94f155efa4 --- M src/osmo-bts-trx/l1_if.h M src/osmo-bts-trx/main.c M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/07/19107/1 diff --git a/src/osmo-bts-trx/l1_if.h b/src/osmo-bts-trx/l1_if.h index 3fda726..7f60ca3 100644 --- a/src/osmo-bts-trx/l1_if.h +++ b/src/osmo-bts-trx/l1_if.h @@ -1,6 +1,8 @@ #ifndef L1_IF_H_TRX #define L1_IF_H_TRX +#include <osmocom/core/rate_ctr.h> + #include <osmo-bts/scheduler.h> #include <osmo-bts/phy_link.h> #include "trx_if.h" @@ -24,6 +26,11 @@ * send burst data for the missing frame numbers. */ +/* bts-trx specific rate counters */ +enum { + BTSTRX_CTR_SCHED_DL_MISS_FN, +}; + /*! clock state of a given TRX */ struct osmo_trx_clock_state { /*! number of FN periods without TRX clock indication */ @@ -47,6 +54,7 @@ /* gsm_bts->model_priv, specific to osmo-bts-trx */ struct bts_trx_priv { struct osmo_trx_clock_state clk_s; + struct rate_ctr_group *ctrs; /* bts-trx specific rate counters */ }; struct trx_config { diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index 0d2a1f7..984e3bc 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -43,6 +43,8 @@ #include <osmocom/core/gsmtap.h> #include <osmocom/core/gsmtap_util.h> #include <osmocom/core/bits.h> +#include <osmocom/core/rate_ctr.h> +#include <osmocom/core/stats.h> #include <osmo-bts/gsm_data.h> #include <osmo-bts/phy_link.h> @@ -59,6 +61,17 @@ #include "l1_if.h" #include "trx_if.h" +static const struct rate_ctr_desc btstrx_ctr_desc[] = { + [BTSTRX_CTR_SCHED_DL_MISS_FN] = {"trx_clk:sched_dl_miss_fn", "Downlink frames scheduled later than expected due to missed timerfd event (due to high system load)"}, +}; +static const struct rate_ctr_group_desc btstrx_ctrg_desc = { + "bts-trx", + "OsmoBtsTrx specific counters", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(btstrx_ctr_desc), + btstrx_ctr_desc +}; + /* dummy, since no direct dsp support */ uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx) { @@ -99,6 +112,7 @@ { struct bts_trx_priv *bts_trx = talloc_zero(bts, struct bts_trx_priv); bts_trx->clk_s.fn_timer_ofd.fd = -1; + bts_trx->ctrs = rate_ctr_group_alloc(bts_trx, &btstrx_ctrg_desc, 0); bts->model_priv = bts_trx; bts->variant = BTS_OSMO_TRX; diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 472bae8..fcd1eee 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -158,7 +158,8 @@ if (expire_count > 1) { LOGP(DL1C, LOGL_NOTICE, "FN timer expire_count=%"PRIu64": We missed %"PRIu64" timers\n", - expire_count, expire_count-1); + expire_count, expire_count - 1); + rate_ctr_add(&bts_trx->ctrs->ctr[BTSTRX_CTR_SCHED_DL_MISS_FN], expire_count - 1); } /* check if transceiver is still alive */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0051b9ab18ebc9f92db11374d856de94f155efa4 Gerrit-Change-Number: 19107 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200702/95cce9cd/attachment.htm>