osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/39819?usp=email )
Change subject: src/_update_src_copy: handle symlink projects
......................................................................
src/_update_src_copy: handle symlink projects
Handle projects that are symlinks to paths in other git repositories,
such as osmocom-bb_layer23 -> osmocom-bb/src/host/layer23.
Fix for:
_update_read_only_src_copy: find failed
Change-Id: Icfe701b8a237385597718374be50a8b81c6ac433
---
M src/_update_src_copy.sh
1 file changed, 41 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/19/39819/1
diff --git a/src/_update_src_copy.sh b/src/_update_src_copy.sh
index a0ea533..f13a357 100644
--- a/src/_update_src_copy.sh
+++ b/src/_update_src_copy.sh
@@ -61,6 +61,45 @@
done
}
+# Some project are symlinks to a path in another git repository (for example
+# osmocom-bb_layer23 -> osmocom-bb/src/host/layer23). For those we need to
+# add such a symlink to the src_copy dir and then run _update_src_copy.sh on
+# the main project (osmocom-bb in the example).
+handle_symlink_proj() {
+ local linkdest
+ local git_topdir
+ local proj_main
+ local relpath
+
+ if ! [ -L "$SRC_DIR/$PROJ" ]; then
+ return
+ fi
+
+ linkdest="$(realpath "$SRC_DIR/$PROJ")"
+ git_topdir="$(cd "$linkdest" && git rev-parse --show-toplevel)"
+
+ if [ -z "$git_topdir" ]; then
+ "_update_src_copy: getting git topdir failed: $linkdest"
+ exit 1
+ fi
+
+ proj_main="$(basename "$git_topdir")"
+
+ # Create the symlink in src_copy
+ if ! [ -L "$DEST_DIR_PROJ" ]; then
+ relpath="$(realpath -s --relative-to="$git_topdir" "$linkdest")"
+ if [ -z "$relpath" ]; then
+ "_update_src_copy: getting relpath failed: $linkdest"
+ exit 1
+ fi
+ ln -s "$proj_main/$relpath" "$DEST_DIR_PROJ"
+ fi
+
+ # Copy the original project files to src_copy
+ exec sh -e "$0" "$SRC_DIR" "$proj_main" "$TIME_START"
+ # Not continuing below (exec)
+}
+
MAKE_DIR="$PWD"
SRC_DIR="$1"
PROJ="$2"
@@ -73,6 +112,8 @@
fi
DEST_DIR_PROJ="$MAKE_DIR/src_copy/$PROJ"
+handle_symlink_proj
+
COPY_LIST="$(mktemp --suffix=-osmo-dev-rsync-copylist)"
cd "$SRC_DIR/$PROJ"
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/39819?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Icfe701b8a237385597718374be50a8b81c6ac433
Gerrit-Change-Number: 39819
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/39818?usp=email )
Change subject: src/_update_src_copy: move functions to top
......................................................................
src/_update_src_copy: move functions to top
Prepare to add a new function in the next patch that gets called early.
Change-Id: I9a2b346e8e6d9a33aa4fc55add6bb9124ea2d3ed
---
M src/_update_src_copy.sh
1 file changed, 14 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/18/39818/1
diff --git a/src/_update_src_copy.sh b/src/_update_src_copy.sh
index d80b5fa..a0ea533 100644
--- a/src/_update_src_copy.sh
+++ b/src/_update_src_copy.sh
@@ -2,20 +2,6 @@
# Update the src_copy dir with all relevant files from the original git
# repository (+ submodules). Used by gen_makefile.py --autoreconf-in-src-copy.
-MAKE_DIR="$PWD"
-SRC_DIR="$1"
-PROJ="$2"
-TIME_START="$3"
-MARKER="$MAKE_DIR/.make.$PROJ.src_copy"
-
-# Don't run more than once per "make" call
-if [ "$(cat "$MARKER" 2>/dev/null)" = "$TIME_START" ]; then
- exit 0
-fi
-
-DEST_DIR_PROJ="$MAKE_DIR/src_copy/$PROJ"
-COPY_LIST="$(mktemp --suffix=-osmo-dev-rsync-copylist)"
-
update_git_dir() {
local src="$1"
local dest="$DEST_DIR_PROJ/$(echo "$src" | cut -c 3-)" # cut: remove './'
@@ -75,6 +61,20 @@
done
}
+MAKE_DIR="$PWD"
+SRC_DIR="$1"
+PROJ="$2"
+TIME_START="$3"
+MARKER="$MAKE_DIR/.make.$PROJ.src_copy"
+
+# Don't run more than once per "make" call
+if [ "$(cat "$MARKER" 2>/dev/null)" = "$TIME_START" ]; then
+ exit 0
+fi
+
+DEST_DIR_PROJ="$MAKE_DIR/src_copy/$PROJ"
+COPY_LIST="$(mktemp --suffix=-osmo-dev-rsync-copylist)"
+
cd "$SRC_DIR/$PROJ"
update_git_dirs_all
rm "$COPY_LIST"
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/39818?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I9a2b346e8e6d9a33aa4fc55add6bb9124ea2d3ed
Gerrit-Change-Number: 39818
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39817?usp=email )
Change subject: Set sched RR Priority on main thread
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39817?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I6aa22125e7de4f472d691b271639d5bee25762cb
Gerrit-Change-Number: 39817
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 18 Mar 2025 14:07:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39817?usp=email )
Change subject: Set sched RR Priority on main thread
......................................................................
Set sched RR Priority on main thread
Since we are still affected by Python GIL, it makes sense to also set
the main thread (which is actually also expected to be real time) to a
real time priority.
Use a slightly higher rr prio (prio + 1) to the clckgen thread.
Change-Id: I6aa22125e7de4f472d691b271639d5bee25762cb
---
M src/target/trx_toolkit/fake_trx.py
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/39817/1
diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py
index ddeb083..8f187ac 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -27,6 +27,7 @@
import select
import sys
import re
+import os
from app_common import ApplicationBase
from burst_fwd import BurstForwarder
@@ -397,7 +398,7 @@
self.trx_list = TRXList()
# Init shared clock generator
- self.clck_gen = CLCKGen([], sched_rr_prio = self.argv.sched_rr_prio)
+ self.clck_gen = CLCKGen([], sched_rr_prio = None if self.argv.sched_rr_prio is None else self.argv.sched_rr_prio + 1)
# This method will be called on each TDMA frame
self.clck_gen.clck_handler = self.clck_handler
@@ -450,6 +451,14 @@
trx_parent.child_trx_list.add_trx(trx_child)
def run(self):
+ if self.argv.sched_rr_prio is not None:
+ sched_param = os.sched_param(self.argv.sched_rr_prio)
+ try:
+ log.info("Setting real time process scheduler to SCHED_RR, priority %u" % (self.argv.sched_rr_prio))
+ os.sched_setscheduler(0, os.SCHED_RR, sched_param)
+ except OSError:
+ log.error("Failed to set real time process scheduler to SCHED_RR, priority %u" % (self.argv.sched_rr_prio))
+
# Compose list of to be monitored sockets
sock_list = []
for trx in self.trx_list.trx_list:
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39817?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I6aa22125e7de4f472d691b271639d5bee25762cb
Gerrit-Change-Number: 39817
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/39815?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: fake_trx: Allow setting sched RR priority for clckgen thread
......................................................................
fake_trx: Allow setting sched RR priority for clckgen thread
With this patch python is still too slow sometimes, with frecuent
overruns in the range 50-2400 microsecs. Still, with higher prio we
should hopefully see less cases where the process is being delayed by a
much higher amount, which may trigger a "no clock" error from
osmo-bts-trx.
Change-Id: I3c7f36c17fc7b9cae1023b4a0ed37f983dc286dc
---
M src/target/trx_toolkit/clck_gen.py
M src/target/trx_toolkit/fake_trx.py
2 files changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/15/39815/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39815?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3c7f36c17fc7b9cae1023b4a0ed37f983dc286dc
Gerrit-Change-Number: 39815
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/docker-playground/+/39816?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: ttcn3-bts-test: Run fake_trx with sched-prio-rr
......................................................................
ttcn3-bts-test: Run fake_trx with sched-prio-rr
Depends: osmocom-bb.git I3c7f36c17fc7b9cae1023b4a0ed37f983dc286dc
Change-Id: I8f9df66e0819881587b55c93043fed9a294ab5e8
---
M ttcn3-bts-test/jenkins.sh
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/16/39816/2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/39816?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I8f9df66e0819881587b55c93043fed9a294ab5e8
Gerrit-Change-Number: 39816
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/39815?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: fake_trx: Allow setting sched RR priority for clckgen thread
......................................................................
fake_trx: Allow setting sched RR priority for clckgen thread
With this patch python is still too slow sometimes, with frecuent
overruns in the range 50-2400 microsecs. Still, with higher prio we
should hopefully see less cases where the process is being delayed by a
much higher amount, which may trigger a "no clock" error from
osmo-bts-trx.
Change-Id: I3c7f36c17fc7b9cae1023b4a0ed37f983dc286dc
---
M src/target/trx_toolkit/clck_gen.py
M src/target/trx_toolkit/fake_trx.py
2 files changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/15/39815/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39815?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3c7f36c17fc7b9cae1023b4a0ed37f983dc286dc
Gerrit-Change-Number: 39815
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>