Change in osmo-hlr[master]: Support setting rt-prio and cpu-affinity mask through VTY

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.org
Thu Aug 20 08:43:17 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/19690 )

Change subject: Support setting rt-prio and cpu-affinity mask through VTY
......................................................................

Support setting rt-prio and cpu-affinity mask through VTY

Change-Id: I33101aae3e2851febc335f6fbf96228eab7cf6df
Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a
Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c
Related: SYS#4986
---
A TODO-RELEASE
M configure.ac
M debian/control
M doc/manuals/osmohlr-usermanual.adoc
M doc/manuals/vty/hlr_vty_reference.xml
M src/hlr.c
M tests/test_nodes.vty
M tests/test_subscriber.vty
8 files changed, 66 insertions(+), 8 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/TODO-RELEASE b/TODO-RELEASE
new file mode 100644
index 0000000..810a346
--- /dev/null
+++ b/TODO-RELEASE
@@ -0,0 +1,10 @@
+# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
+# according to https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
+# In short:
+# LIBVERSION=c:r:a
+# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
+# If any interfaces have been added, removed, or changed since the last update: c + 1:0:0.
+# 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-hlr        update osmo-gsm-manuals dependency to > 0.3.0 for vty_cpu_sched.adoc include
diff --git a/configure.ac b/configure.ac
index b920790..341e925 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,10 +39,10 @@
 
 PKG_CHECK_MODULES(TALLOC, [talloc >= 2.0.1])
 
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0)
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.3.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.3.0)
-PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.3.0)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.4.0)
+PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.4.0)
 PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0)
 
 PKG_CHECK_MODULES(SQLITE3, sqlite3)
diff --git a/debian/control b/debian/control
index c737d8d..68d789e 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@
                dh-systemd (>= 1.5),
                autotools-dev,
                python3-minimal,
-               libosmocore-dev,
+               libosmocore-dev (>= 1.4.0),
                libosmo-abis-dev,
                libosmo-netif-dev,
                libsqlite3-dev,
diff --git a/doc/manuals/osmohlr-usermanual.adoc b/doc/manuals/osmohlr-usermanual.adoc
index 68db1a7..f651f06 100644
--- a/doc/manuals/osmohlr-usermanual.adoc
+++ b/doc/manuals/osmohlr-usermanual.adoc
@@ -28,6 +28,8 @@
 
 include::./common/chapters/gsup.adoc[]
 
+include::./common/chapters/vty_cpu_sched.adoc[]
+
 include::./common/chapters/port_numbers.adoc[]
 
 include::./common/chapters/bibliography.adoc[]
@@ -35,4 +37,3 @@
 include::./common/chapters/glossary.adoc[]
 
 include::./common/chapters/gfdl.adoc[]
-
diff --git a/doc/manuals/vty/hlr_vty_reference.xml b/doc/manuals/vty/hlr_vty_reference.xml
index 8e56f4b..7a9eb03 100644
--- a/doc/manuals/vty/hlr_vty_reference.xml
+++ b/doc/manuals/vty/hlr_vty_reference.xml
@@ -408,6 +408,13 @@
         <param name='services' doc='List configured service addresses as sent to remote mslookup requests' />
       </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>
   </node>
   <node id='enable'>
     <name>enable</name>
@@ -935,6 +942,13 @@
         <param name='services' doc='List configured service addresses as sent to remote mslookup requests' />
       </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>
   </node>
   <node id='config'>
     <name>config</name>
@@ -1181,6 +1195,11 @@
         <param name='mslookup' doc='Configure Distributed GSM mslookup' />
       </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>
@@ -1431,6 +1450,27 @@
       </params>
     </command>
   </node>
+  <node id='config-cpu-sched'>
+    <name>config-cpu-sched</name>
+    <command id='policy rr <1-32>'>
+      <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='<1-32>' doc='Set the SCHED_RR real-time priority' />
+      </params>
+    </command>
+    <command id='cpu-affinity (self|all|<0-4294967295>|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' threads' />
+        <param name='<0-4294967295>' 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-hlr'>
     <name>config-hlr</name>
     <command id='gsup'>
diff --git a/src/hlr.c b/src/hlr.c
index e4d6c23..ac5c1ec 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -31,6 +31,7 @@
 #include <osmocom/vty/command.h>
 #include <osmocom/vty/telnet_interface.h>
 #include <osmocom/vty/ports.h>
+#include <osmocom/vty/cpu_sched_vty.h>
 #include <osmocom/ctrl/control_vty.h>
 #include <osmocom/gsm/apn.h>
 #include <osmocom/gsm/gsm48_ie.h>
@@ -732,6 +733,7 @@
 	handle_options(argc, argv);
 	hlr_vty_init();
 	dgsm_vty_init();
+	osmo_cpu_sched_vty_init(hlr_ctx);
 
 	rc = vty_read_config_file(cmdline_opts.config_file, NULL);
 	if (rc < 0) {
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index cf41207..d9971f7 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -16,6 +16,7 @@
   subscriber (imsi|msisdn|id|imei) IDENT show
   show subscriber (imsi|msisdn|id|imei) IDENT
   show mslookup services
+...
 
 OsmoHLR> enable
 OsmoHLR# ?
@@ -25,12 +26,15 @@
 OsmoHLR# configure terminal
 OsmoHLR(config)# ?
 ...
-  hlr       Configure the HLR
-  mslookup  Configure Distributed GSM mslookup
+  hlr        Configure the HLR
+  mslookup   Configure Distributed GSM mslookup
+...
+
 OsmoHLR(config)# list
 ...
   hlr
   mslookup
+...
 
 OsmoHLR(config)# hlr
 OsmoHLR(config-hlr)# ?
diff --git a/tests/test_subscriber.vty b/tests/test_subscriber.vty
index fb5da0e..4082700 100644
--- a/tests/test_subscriber.vty
+++ b/tests/test_subscriber.vty
@@ -14,6 +14,7 @@
   subscriber (imsi|msisdn|id|imei) IDENT update imei (none|IMEI)
   subscriber (imsi|msisdn|id|imei) IDENT update network-access-mode (none|cs|ps|cs+ps)
   show mslookup services
+...
 
 OsmoHLR# subscriber?
   subscriber  Subscriber management commands

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/19690
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I33101aae3e2851febc335f6fbf96228eab7cf6df
Gerrit-Change-Number: 19690
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200820/245f6ef7/attachment.htm>


More information about the gerrit-log mailing list