* RFC: Replacing rtctl style profile files with JSON
@ 2025-09-03 1:06 John B. Wyatt IV
0 siblings, 0 replies; only message in thread
From: John B. Wyatt IV @ 2025-09-03 1:06 UTC (permalink / raw)
To: Clark Williams, John Kacur
Cc: linux-rt-users, kernel-rts-sst, Arnaldo Carvalho de Melo
Hello linux-rt-users,
This email could also be titled: "Does anyone use profile saving and loading in Tuna?" :-)
Internally an issue came up that pointed out saving a profile printed a message about rtctl and how 'save' and 'apply' were ambiguous. The same profile could not be loaded without errors. I was able to reproduce similar errors by loading the example.conf file included in the Tuna source code. It 'errored' out with warnings ‘Error File contains no section headers’.
The naming for these files is also inconsistent in tuna: the gui calls the files profiles, tuna save calls them ‘kthreads sched tunables’, the ‘tuna apply’ has error messages calling them config files.
I propose cleaning up and replacing the rtctl style format with JSON files or removing the profile saving and resuming completely from tuna. The older ‘tuna apply’ loading code will be depreciated and kept for a while so users can have time to migrate.
Tuna requires root access to set profile settings. A barely used parser is a security issue. The load parser also requires a bit of a rework as it currently treats both errors and warnings the same way. See checkConfigFile and loadTuna. [1] rtctl has not been maintained in over a decade and not included in major distributions. I see no point in making sure files generated by Tuna work with rtctl or if they even work now (or if I can even compile rtctl these days). These arguments justify replacing, or removing, the profile functionality.
The gui has a nice interface for managing profiles, the values in the profile, and even correcting issues in a load profile that ‘tuna apply’ does not do (loadTuna is not used). I can imagine users may want to use this to test and tune their systems.
It has a few bugs too: if you create a new profile from the gui, the tab to actually set values disappears. The buttons may not respond properly. It even froze while I was trying to screen share.
'save' and 'apply' subcommands should also be renamed to 'save_profile' and 'load_profile'.
Mentions of rtctl should be removed except for a comment that Tuna was intended to replace rtctl in the manpage.
JSON is suggested because the two built in choices for Python are JSON or XML. I would like to avoid adding an external dependency on another library. JSON is a widely used format that gets test coverage with cpython. XML is more complicated and less often used these days.
Please sound off. Are there users that still use profile saving and resuming? How do you use it? Do you use the command line or the gui? If you use profiles, are you willing to test the new code?
[1] https://git.kernel.org/pub/scm/utils/tuna/tuna.git/tree/tuna/config.py#n394
--
Sincerely,
John Wyatt
Software Engineer, Core Kernel
Red Hat
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-03 1:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03 1:06 RFC: Replacing rtctl style profile files with JSON John B. Wyatt IV
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).