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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18862 )
Change subject: scheduler: Add rate_ctr informing about too low rts-advance
......................................................................
scheduler: Add rate_ctr informing about too low rts-advance
Change-Id: I76c3dd4020c6d74192b03b1d42413ae536da5f05
---
M include/osmo-bts/scheduler.h
M src/common/scheduler.c
2 files changed, 25 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index f5f346e..e65665f 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -2,6 +2,7 @@
#define TRX_SCHEDULER_H
#include <osmocom/core/utils.h>
+#include <osmocom/core/rate_ctr.h>
#include <osmo-bts/gsm_data.h>
@@ -142,6 +143,8 @@
struct llist_head dl_prims; /* Queue primitives for TX */
+ struct rate_ctr_group *ctrs; /* rate counters */
+
/* Channel states for all logical channels */
struct l1sched_chan_state chan_state[_TRX_CHAN_MAX];
};
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index c1bd19f..b539733 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -30,6 +30,8 @@
#include <osmocom/core/talloc.h>
#include <osmocom/core/bits.h>
#include <osmocom/core/utils.h>
+#include <osmocom/core/rate_ctr.h>
+#include <osmocom/core/stats.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/a5.h>
@@ -562,6 +564,21 @@
},
};
+enum {
+ L1SCHED_TS_CTR_DL_LATE,
+};
+
+static const struct rate_ctr_desc l1sched_ts_ctr_desc[] = {
+ [L1SCHED_TS_CTR_DL_LATE] = {"l1sched_ts:dl_late", "Downlink frames arrived too late to submit to lower layers"},
+};
+static const struct rate_ctr_group_desc l1sched_ts_ctrg_desc = {
+ "l1sched_ts",
+ "L1 scheduler timeslot",
+ OSMO_STATS_CLASS_GLOBAL,
+ ARRAY_SIZE(l1sched_ts_ctr_desc),
+ l1sched_ts_ctr_desc
+};
+
/*
* init / exit
*/
@@ -582,7 +599,9 @@
struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
l1ts->mf_index = 0;
+ l1ts->ctrs = rate_ctr_group_alloc(trx, &l1sched_ts_ctrg_desc, (trx->nr + 1) * 10 + tn);
INIT_LLIST_HEAD(&l1ts->dl_prims);
+
for (i = 0; i < ARRAY_SIZE(l1ts->chan_state); i++) {
struct l1sched_chan_state *chan_state;
chan_state = &l1ts->chan_state[i];
@@ -604,6 +623,8 @@
for (tn = 0; tn < ARRAY_SIZE(l1t->ts); tn++) {
struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
msgb_queue_flush(&l1ts->dl_prims);
+ rate_ctr_group_free(l1ts->ctrs);
+ l1ts->ctrs = NULL;
for (i = 0; i < _TRX_CHAN_MAX; i++) {
struct l1sched_chan_state *chan_state;
chan_state = &l1ts->chan_state[i];
@@ -670,6 +691,7 @@
prim_fn, l1sap_fn, fn,
get_lchan_by_chan_nr(l1t->trx, chan_nr)->name,
trx_chan_desc[chan].name);
+ rate_ctr_inc2(l1ts->ctrs, L1SCHED_TS_CTR_DL_LATE);
/* unlink and free message */
llist_del(&msg->list);
msgb_free(msg);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18862
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I76c3dd4020c6d74192b03b1d42413ae536da5f05
Gerrit-Change-Number: 18862
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200618/5e3eddc5/attachment.htm>