aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-08-18 13:50:00 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-08-18 13:50:00 +0200
commitaae7daff81b47de37c17f2a02db2fd088e7b52cb (patch)
treef2ec9ceaa94868b822b418f3fdd7525b6e9ff443
parentb32936d8231a73bd6565d00db44961b0243a3ca8 (diff)
Support setting rt-prio and cpu-affinity mask through VTY
Change-Id: I1af1b154d14de6d6d6fba08f15f167f4b2ed9aa2 Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c Related: SYS#4986
-rw-r--r--TODO-RELEASE4
-rw-r--r--configure.ac10
-rw-r--r--debian/control2
-rw-r--r--doc/manuals/vty/sgsn_vty_reference.xml40
-rw-r--r--src/sgsn/sgsn_main.c2
5 files changed, 49 insertions, 9 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE
index e5e3b39c..6b29a879 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -1,4 +1,2 @@
#component what description / commit summary line
-manual needs common chapter cs7-config.adoc from osmo-gsm-manuals > 0.3.0
-libosmocore osmo_mobile_identity Depends on libosmocore > 1.3.0
-osmo-bsc Mobile Identity Coding OsmoBSC is stricter in rejecting invalid coding of Mobile Identity IEs
+manual needs common chapter cs7-config.adoc, vty_cpu_sched.adoc from osmo-gsm-manuals > 0.3.0
diff --git a/configure.ac b/configure.ac
index db2e1ad1..12af7e64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,11 +47,11 @@ AC_SEARCH_LIBS([dlsym], [dl dld], [LIBRARY_DLSYM="$LIBS";LIBS=""])
AC_SUBST(LIBRARY_DLSYM)
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.2.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.2.0)
-PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.2.0)
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.2.0)
-PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 1.2.0)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 1.4.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0)
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.4.0)
PKG_CHECK_MODULES(LIBOSMOGSUPCLIENT, libosmo-gsup-client >= 1.0.0)
diff --git a/debian/control b/debian/control
index 1b659eb0..e512c8fb 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Build-Depends: debhelper (>=9),
libtalloc-dev,
libc-ares-dev,
libgtp-dev (>= 1.5.0),
- libosmocore-dev (>= 1.2.0),
+ libosmocore-dev (>= 1.4.0),
libosmo-abis-dev (>= 0.6.0),
libosmo-netif-dev (>= 0.4.0),
libosmo-gsup-client-dev (>= 1.0.0),
diff --git a/doc/manuals/vty/sgsn_vty_reference.xml b/doc/manuals/vty/sgsn_vty_reference.xml
index e49d2783..8ffc607b 100644
--- a/doc/manuals/vty/sgsn_vty_reference.xml
+++ b/doc/manuals/vty/sgsn_vty_reference.xml
@@ -431,6 +431,13 @@
<param name='[TNNNN]' doc='T- or X-timer-number -- 3GPP compliant timer number of the format &apos;1234&apos; or &apos;T1234&apos; or &apos;t1234&apos;; Osmocom-specific timer number of the format: &apos;X1234&apos; or &apos;x1234&apos;.' />
</params>
</command>
+ <command id='show cpu-sched threads'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='cpu-sched' doc='Show Sched section information' />
+ <param name='threads' doc='Show information about running threads)' />
+ </params>
+ </command>
<command id='show cs7 instance &lt;0-15&gt; users'>
<params>
<param name='show' doc='Show running system information' />
@@ -1113,6 +1120,13 @@
<param name='update-auth-info' doc='Complete the send authentication info procedure' />
</params>
</command>
+ <command id='show cpu-sched threads'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='cpu-sched' doc='Show Sched section information' />
+ <param name='threads' doc='Show information about running threads)' />
+ </params>
+ </command>
<command id='show cs7 instance &lt;0-15&gt; users'>
<params>
<param name='show' doc='Show running system information' />
@@ -1560,6 +1574,11 @@
<param name='ctrl' doc='Configure the Control Interface' />
</params>
</command>
+ <command id='cpu-sched'>
+ <params>
+ <param name='cpu-sched' doc='Configure CPU Scheduler related settings' />
+ </params>
+ </command>
<command id='cs7 instance &lt;0-15&gt;'>
<params>
<param name='cs7' doc='ITU-T Signaling System 7' />
@@ -2348,6 +2367,27 @@
</params>
</command>
</node>
+ <node id='config-cpu-sched'>
+ <name>config-cpu-sched</name>
+ <command id='policy rr &lt;1-32&gt;'>
+ <params>
+ <param name='policy' doc='Set the scheduling policy to use for the process' />
+ <param name='rr' doc='Use the SCHED_RR real-time scheduling algorithm' />
+ <param name='&lt;1-32&gt;' doc='Set the SCHED_RR real-time priority' />
+ </params>
+ </command>
+ <command id='cpu-affinity (self|all|&lt;0-4294967295&gt;|THREADNAME) CPUHEXMASK [delay]'>
+ <params>
+ <param name='cpu-affinity' doc='Set CPU affinity mask on a (group of) thread(s)' />
+ <param name='self' doc='Set CPU affinity mask on thread running the VTY' />
+ <param name='all' doc='Set CPU affinity mask on all process&apos; threads' />
+ <param name='&lt;0-4294967295&gt;' doc='Set CPU affinity mask on a thread with specified PID' />
+ <param name='THREADNAME' doc='Set CPU affinity mask on a thread with specified thread name' />
+ <param name='CPUHEXMASK' doc='CPU affinity mask' />
+ <param name='[delay]' doc='If set, delay applying the affinity mask now and let the app handle it at a later point' />
+ </params>
+ </command>
+ </node>
<node id='config-sgsn'>
<name>config-sgsn</name>
<command id='gtp local-ip A.B.C.D'>
diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c
index 5b538155..257c3a2f 100644
--- a/src/sgsn/sgsn_main.c
+++ b/src/sgsn/sgsn_main.c
@@ -49,6 +49,7 @@
#include <osmocom/vty/stats.h>
#include <osmocom/vty/ports.h>
#include <osmocom/vty/misc.h>
+#include <osmocom/vty/cpu_sched_vty.h>
#include <osmocom/ctrl/control_vty.h>
@@ -414,6 +415,7 @@ int main(int argc, char **argv)
osmo_stats_vty_add_cmds();
sgsn_vty_init(&sgsn->cfg);
ctrl_vty_init(tall_sgsn_ctx);
+ osmo_cpu_sched_vty_init(tall_sgsn_ctx);
#if BUILD_IU
OSMO_ASSERT(osmo_ss7_init() == 0);