Change in libosmocore[master]: vty sched: add api to force deferred applying

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
Fri Sep 10 15:02:27 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/25415 )

Change subject: vty sched: add api to force deferred applying
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/25415/2/src/vty/cpu_sched_vty.c 
File src/vty/cpu_sched_vty.c:

https://gerrit.osmocom.org/c/libosmocore/+/25415/2/src/vty/cpu_sched_vty.c@425 
PS2, Line 425: 	if (applynow) {
So the problem imho is that your are interactively using a set of VTY commands in the "configure terminal" section which was aimed at be applied/parsed from config file during startup, when only 1 thread exists and other threads are created later.
I see 3 possible solutions for your use case I would agree with:

1- Have a new VTY command in the "enable" node which is aimed at interactively (while the program is running) setting/changing the cu affinity of a given (or all) thread. This new command would basically reuse most of the existing code in this function (cfg_sched_cpu_affinity_cmd) with the exception that it wouldn't store config (see line 451), or it would store it temporarily but not written back to cfg file (have a ->temporary=true).

2- You use this same VTY command, using "delay" (since that's what's expected for the thread you want to set), and then, after storing the config, you attempt applying it now too if VTY is in interactive mode:
"""
if (!applynow || vty->type != VTY_FILE) {
rc = my_sched_setaffinity(tid_type, pid, cpuset, cpuset_size);
if (rc == -1) vty_oput("%% [delay] Failed to apply the cmd immediately, configuration stored for later use\n")
}
"""



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id8405099e6b316c2e14fb0c9b3c5e80a68a91277
Gerrit-Change-Number: 25415
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 10 Sep 2021 15:02:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210910/bf5f11a9/attachment.htm>


More information about the gerrit-log mailing list