diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-07-28 12:11:33 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-08-10 20:10:50 +0000 |
commit | c131ce45bab72cc694dc7620467f98f9ffc0fb14 (patch) | |
tree | 24c73b63a5387251ad1b1aa72e3d6d1840f92796 /src/common/main.c | |
parent | 30458c83e561bbb319a4e1fba5a4ce00e611b691 (diff) |
common: Support setting rt prio through new libosmovty sched VTY cmds
We gain other features from libosmovty for free, like configuring
cpu-affinity of the only thread in the process.
Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a
Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c
Related: SYS#4986
Change-Id: Ice46e406b84fa11afcc7ba31e521e7677df73cf3
Diffstat (limited to 'src/common/main.c')
-rw-r--r-- | src/common/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/main.c b/src/common/main.c index f4dc505d..dfdc2a74 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -38,6 +38,7 @@ #include <osmocom/core/application.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/logging.h> +#include <osmocom/vty/cpu_sched_vty.h> #include <osmocom/core/gsmtap_util.h> #include <osmocom/core/gsmtap.h> @@ -74,7 +75,7 @@ static void print_help() " -T --timestamp Prefix every log line with a timestamp\n" " -V --version Print version information and exit\n" " -e --log-level Set a global log-level\n" - " -r --realtime PRIO Use SCHED_RR with the specified priority\n" + " -r --realtime PRIO Use SCHED_RR with the specified priority (deprecated, use VTY instead)\n" " -i --gsmtap-ip The destination IP used for GSMTAP.\n" ); bts_model_print_help(); @@ -145,6 +146,8 @@ static void handle_options(int argc, char **argv) break; case 'r': rt_prio = atoi(optarg); + fprintf(stderr, "Parameter -r is deprecated, use VTY cpu-sched " + "node setting 'policy rr %d' instead\n", rt_prio); break; case 'i': gsmtap_ip = optarg; @@ -238,6 +241,7 @@ int bts_main(int argc, char **argv) osmo_stats_init(tall_bts_ctx); vty_init(&bts_vty_info); ctrl_vty_init(tall_bts_ctx); + osmo_cpu_sched_vty_init(tall_bts_ctx); rate_ctr_init(tall_bts_ctx); handle_options(argc, argv); |