Change in osmo-ggsn[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 10:48:18 UTC 2020


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


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

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

Change-Id: Ic8d38a5f64c661ce650004c68d73bd77149caef4
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/ggsn_vty_reference.xml
M ggsn/ggsn_main.c
5 files changed, 47 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/87/19687/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..dd0df1a 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-ggsn        update osmo-gsm-manuals dependency to > 0.3.0 for vty_cpu_sched.adoc include
diff --git a/configure.ac b/configure.ac
index 861a977..9d8b4bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,9 +152,9 @@
 
 AM_INIT_AUTOMAKE([foreign])
 
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.1.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.1.0)
-PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.1.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)
 
 AC_ARG_ENABLE(sanitize,
 	[AS_HELP_STRING(
diff --git a/debian/control b/debian/control
index 970b314..0822773 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@
                pkg-config,
                libdpkg-perl, git,
                dh-autoreconf,
-               libosmocore-dev (>= 1.1.0),
+               libosmocore-dev (>= 1.4.0),
                osmo-gsm-manuals-dev
 Standards-Version: 3.9.6
 Vcs-Browser: http://git.osmocom.org/osmo-ggsn/
diff --git a/doc/manuals/vty/ggsn_vty_reference.xml b/doc/manuals/vty/ggsn_vty_reference.xml
index c899ed9..bbc8471 100644
--- a/doc/manuals/vty/ggsn_vty_reference.xml
+++ b/doc/manuals/vty/ggsn_vty_reference.xml
@@ -415,6 +415,13 @@
         <param name='[NAME]' doc='(null)' />
       </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>
@@ -822,6 +829,13 @@
         <param name='[NAME]' doc='(null)' />
       </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>
@@ -1071,6 +1085,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>
   </node>
   <node id='config-log'>
     <name>config-log</name>
@@ -1319,6 +1338,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-ggsn'>
     <name>config-ggsn</name>
     <command id='description .TEXT'>
diff --git a/ggsn/ggsn_main.c b/ggsn/ggsn_main.c
index 81a8ab1..d9fb4e6 100644
--- a/ggsn/ggsn_main.c
+++ b/ggsn/ggsn_main.c
@@ -45,6 +45,7 @@
 #include <osmocom/vty/ports.h>
 #include <osmocom/vty/command.h>
 #include <osmocom/vty/misc.h>
+#include <osmocom/vty/cpu_sched_vty.h>
 
 #include "ggsn.h"
 
@@ -158,6 +159,7 @@
 	osmo_stats_vty_add_cmds();
 	ggsn_vty_init();
 	ctrl_vty_init(tall_ggsn_ctx);
+	osmo_cpu_sched_vty_init(tall_ggsn_ctx);
 
 	handle_options(argc, argv);
 

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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ic8d38a5f64c661ce650004c68d73bd77149caef4
Gerrit-Change-Number: 19687
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/eca5a236/attachment.htm>


More information about the gerrit-log mailing list