Change in osmo-sgsn[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/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Aug 18 11:50:13 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/19700 )


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

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
---
M TODO-RELEASE
M configure.ac
M debian/control
M doc/manuals/vty/sgsn_vty_reference.xml
M src/sgsn/sgsn_main.c
5 files changed, 49 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/00/19700/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index e5e3b39..6b29a87 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 db2e1ad..12af7e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,11 +47,11 @@
 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 1b659eb..e512c8f 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@
                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 e49d278..8ffc607 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 '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'.' />
       </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 <0-15> 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 <0-15> 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 <0-15>'>
       <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 <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-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 5b53815..257c3a2 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 @@
 	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);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I1af1b154d14de6d6d6fba08f15f167f4b2ed9aa2
Gerrit-Change-Number: 19700
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200818/b1f631bb/attachment.htm>


More information about the gerrit-log mailing list