summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-08-18 12:05:53 +0200
committerlaforge <laforge@osmocom.org>2020-08-20 08:41:36 +0000
commit002197560d38e11ea28d8f1f6422a850167def5b (patch)
tree7ed55fc2cf19e7f0088eeea4d4ae0398a19ac093
parent661c55572953c3df71cfeb951c621207d68c55cb (diff)
Support setting rt-prio and cpu-affinity mask through VTY
Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c Related: SYS#4986 Change-Id: Ib9faa68c1cd09a026909c792a1fd5557c9893fe3
-rw-r--r--TODO-RELEASE1
-rw-r--r--configure.ac6
-rw-r--r--debian/control2
-rw-r--r--doc/manuals/osmostp-usermanual.adoc3
-rw-r--r--doc/manuals/vty/osmo-stp_vty_reference.xml40
-rw-r--r--stp/stp_main.c2
6 files changed, 49 insertions, 5 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..b274427 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+osmo-stp update osmo-gsm-manuals dependency to > 0.3.0 for vty_cpu_sched.adoc include
diff --git a/configure.ac b/configure.ac
index 33b71b7..1ec3b01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,9 +34,9 @@ if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
fi
PKG_PROG_PKG_CONFIG([0.20])
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.3.0)
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.3.0)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.4.0)
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.7.0)
old_LIBS=$LIBS
diff --git a/debian/control b/debian/control
index fd23fbd..f8d25f6 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Priority: optional
Build-Depends: debhelper (>= 9),
autotools-dev,
pkg-config,
- libosmocore-dev (>= 1.3.0),
+ libosmocore-dev (>= 1.4.0),
autoconf,
automake,
libtool,
diff --git a/doc/manuals/osmostp-usermanual.adoc b/doc/manuals/osmostp-usermanual.adoc
index 9f41e5d..a34c2b1 100644
--- a/doc/manuals/osmostp-usermanual.adoc
+++ b/doc/manuals/osmostp-usermanual.adoc
@@ -18,6 +18,8 @@ include::./common/chapters/vty.adoc[]
include::./common/chapters/logging.adoc[]
+include::./common/chapters/vty_cpu_sched.adoc[]
+
//include::./common/chapters/bts.adoc[]
//include::../OsmoNITB/chapters/bts-examples.adoc[]
@@ -31,4 +33,3 @@ include::./common/chapters/bibliography.adoc[]
include::./common/chapters/glossary.adoc[]
include::./common/chapters/gfdl.adoc[]
-
diff --git a/doc/manuals/vty/osmo-stp_vty_reference.xml b/doc/manuals/vty/osmo-stp_vty_reference.xml
index ebe8b29..e904469 100644
--- a/doc/manuals/vty/osmo-stp_vty_reference.xml
+++ b/doc/manuals/vty/osmo-stp_vty_reference.xml
@@ -430,6 +430,13 @@
<param name='timers' doc='Show List of SCCP timers' />
</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 fsm NAME'>
<params>
<param name='show' doc='Show running system information' />
@@ -917,6 +924,13 @@
<param name='timers' doc='Show List of SCCP timers' />
</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 fsm NAME'>
<params>
<param name='show' doc='Show running system information' />
@@ -1220,6 +1234,11 @@
<param name='&lt;0-15&gt;' doc='An instance of the SS7 stack' />
</params>
</command>
+ <command id='cpu-sched'>
+ <params>
+ <param name='cpu-sched' doc='Configure CPU Scheduler related settings' />
+ </params>
+ </command>
</node>
<node id='config-log'>
<name>config-log</name>
@@ -1893,4 +1912,25 @@
</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>
</vtydoc>
diff --git a/stp/stp_main.c b/stp/stp_main.c
index 19420c0..33305b3 100644
--- a/stp/stp_main.c
+++ b/stp/stp_main.c
@@ -40,6 +40,7 @@
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/logging.h>
#include <osmocom/vty/misc.h>
+#include <osmocom/vty/cpu_sched_vty.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
@@ -186,6 +187,7 @@ int main(int argc, char **argv)
osmo_stats_vty_add_cmds();
osmo_ss7_vty_init_sg(tall_stp_ctx);
osmo_sccp_vty_init();
+ osmo_cpu_sched_vty_init(tall_stp_ctx);
osmo_fsm_vty_add_cmds();
osmo_talloc_vty_add_cmds();