Package: tuned
Version: 2.15.0-1
Severity: normal

Dear Maintainer,

First of all, I'm glad to see that there is again a latest-version tuned 
package.
We've recently started using tuned, so far with some local patches to make 
things work on Debian, and are happy to share our findings.


Paths related to grub (required by the bootloader plugin):

diff --git a/tuned/consts.py b/tuned/consts.py
index 733ad51..f0acf9e 100644
--- a/tuned/consts.py
+++ b/tuned/consts.py
@@ -24,7 +24,7 @@ ERROR_THRESHOLD = 3
 
 # bootloader plugin configuration
 BOOT_DIR = "/boot"
-GRUB2_CFG_FILES = ["/etc/grub2.cfg", "/etc/grub2-efi.cfg"]
+GRUB2_CFG_FILES = ["/boot/grub/grub.cfg"]
 GRUB2_CFG_DIR = "/etc/grub.d"
 GRUB2_TUNED_TEMPLATE_NAME = "00_tuned"
 GRUB2_TUNED_TEMPLATE_PATH = GRUB2_CFG_DIR + "/" + GRUB2_TUNED_TEMPLATE_NAME

diff --git a/tuned/plugins/plugin_bootloader.py 
b/tuned/plugins/plugin_bootloader.py
index 8ca5b8a..4677435 100644
--- a/tuned/plugins/plugin_bootloader.py
+++ b/tuned/plugins/plugin_bootloader.py
@@ -193,7 +193,7 @@ class BootloaderPlugin(base.Plugin):
        def _update_grubenv(self, d):
                log.debug("updating grubenv, setting %s" % str(d));
                l = ["%s=%s" % (str(option), str(value)) for option, value in 
d.items()]
-               (rc, out) = self._cmd.execute(["grub2-editenv", "-", "set"] + l)
+               (rc, out) = self._cmd.execute(["grub-editenv", "-", "set"] + l)
                if rc != 0:
                        log.warn("cannot update grubenv: '%s'" % out)
                        return False;


Python bindings for perf (required by the scheduler and irqbalance plugins):
This is a little more tricky, because it needs to be fixed elsewhere... 
currently these plugins simply fail when trying to "import perf". The required 
module is part of the kernel sources, and is currently not packaged.
Two things are required:
  * The package linux-perf needs to ship the binding itself (perf.so)
  * A wrapper is needed to select the correct version based on the running 
kernel, same as for the "perf" executable, where this wrapper is located in 
package linux-base
For Linux 4.19, we posted a patch 
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860957#10), for 5.10 we have 
something similar which we'd be happy to contribute.


Systemd unit file (tuned.service):
Currently passes -P to have tuned write its own PID file, and -l to have tuned 
write its own log file.
Wouldn't it be better practice, to
  * remove -P, as systemd will take care of the PID file
  * remove -l, and have systemd direct tuned's stdout to the journal

Best,
Adriaan

Reply via email to