From b35454601111f6a970363a5f26c44870d7d5e93162cd797bb6e9bba2722f239f Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 11 Jan 2019 18:51:00 +0000 Subject: [PATCH 1/6] Accepting request 664862 from home:trenn:branches:Base:System - Update to latest git head commit 26db89de18efad1b4536 including quite some mainline fixes OBS-URL: https://build.opensuse.org/request/show/664862 OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=57 --- _service | 1 - tuned-2.10.0.tar.xz | 4 ++-- tuned.changes | 6 ++++++ tuned.spec | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/_service b/_service index 339b07d..ea86061 100644 --- a/_service +++ b/_service @@ -6,7 +6,6 @@ 2.9.0+git%cd.%h --> 2.10.0 - enable tuned*.tar diff --git a/tuned-2.10.0.tar.xz b/tuned-2.10.0.tar.xz index ac6b2d3..8b377c9 100644 --- a/tuned-2.10.0.tar.xz +++ b/tuned-2.10.0.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f409c066754d23ae27d40fa34b36f2f5de66b4188f79b09cd5a9ebc0a99f386 -size 132068 +oid sha256:845edda9d83d25643efa266f7edf11719a17b32e3955b79c89755ad20674cdce +size 133120 diff --git a/tuned.changes b/tuned.changes index 5557112..1b96608 100644 --- a/tuned.changes +++ b/tuned.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 11 18:26:17 UTC 2019 - trenn@suse.de + +- Update to latest git head commit 26db89de18efad1b4536 + including quite some mainline fixes + ------------------------------------------------------------------- Thu Jan 3 15:43:38 UTC 2019 - trenn@suse.de diff --git a/tuned.spec b/tuned.spec index 8542adb..52d243b 100644 --- a/tuned.spec +++ b/tuned.spec @@ -237,6 +237,7 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile %{_mandir}/man8/tuned* %dir %{_datadir}/tuned %ghost %dir /run/tuned +%{_prefix}/lib/kernel/install.d/92-tuned.install %files gtk %dir %{_datadir}/icons/hicolor From a69c857421e3c97e9d33f43bb8152fb5e3ba902b21dacfbd65058155eb3ddce5 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 11 Jan 2019 19:21:03 +0000 Subject: [PATCH 2/6] Accepting request 664867 from home:trenn:branches:Base:System - tuned needs polkit daemon running OBS-URL: https://build.opensuse.org/request/show/664867 OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=58 --- tuned.changes | 1 + tuned.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/tuned.changes b/tuned.changes index 1b96608..f6107a8 100644 --- a/tuned.changes +++ b/tuned.changes @@ -3,6 +3,7 @@ Fri Jan 11 18:26:17 UTC 2019 - trenn@suse.de - Update to latest git head commit 26db89de18efad1b4536 including quite some mainline fixes +- tuned needs polkit daemon running ------------------------------------------------------------------- Thu Jan 3 15:43:38 UTC 2019 - trenn@suse.de diff --git a/tuned.spec b/tuned.spec index 52d243b..2351e52 100644 --- a/tuned.spec +++ b/tuned.spec @@ -40,6 +40,7 @@ Requires: cpupower >= 4.19 Requires: ethtool Requires: gawk Requires: hdparm +Requires: polkit Requires: python3-configobj Requires: python3-dbus-python Requires: python3-decorator From a4956fdd5bba318ab643c3668fe1a746dcc56f2ab587d2fcab64162d386dbd6b Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 25 Jan 2019 11:20:50 +0000 Subject: [PATCH 3/6] Accepting request 668599 from home:trenn:branches:Base:System - Differ archs and x86 CPU vendors to avoid wrong warning about a missing intel tool (x86_energy_perf_bias) - Remember arch and x86 CPU vendor to allow arch/vendor specific CPU tunings in the future (fate#326694) OBS-URL: https://build.opensuse.org/request/show/668599 OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=59 --- tuned.changes | 8 +++ tuned.spec | 1 + ...er_x86_and_other_archs_in_cpu_plugin.patch | 72 +++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 tuned_differ_x86_and_other_archs_in_cpu_plugin.patch diff --git a/tuned.changes b/tuned.changes index f6107a8..d01de75 100644 --- a/tuned.changes +++ b/tuned.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jan 16 10:47:12 UTC 2019 - trenn@suse.de + +- Differ archs and x86 CPU vendors to avoid wrong warning about a + missing intel tool (x86_energy_perf_bias) +- Remember arch and x86 CPU vendor to allow arch/vendor specific + CPU tunings in the future (fate#326694) + ------------------------------------------------------------------- Fri Jan 11 18:26:17 UTC 2019 - trenn@suse.de diff --git a/tuned.spec b/tuned.spec index 2351e52..73a2b16 100644 --- a/tuned.spec +++ b/tuned.spec @@ -30,6 +30,7 @@ Source1: tuned.rpmlintrc # PATCH-FIX-OPENSUSE fix-allow-receive_sender-default.patch allow receive_* is normally # not needed as that is the default -- Patch0: fix-allow-receive_sender-default.patch +Patch1: tuned_differ_x86_and_other_archs_in_cpu_plugin.patch BuildRequires: bash-completion BuildRequires: desktop-file-utils BuildRequires: pkgconfig diff --git a/tuned_differ_x86_and_other_archs_in_cpu_plugin.patch b/tuned_differ_x86_and_other_archs_in_cpu_plugin.patch new file mode 100644 index 0000000..34de16a --- /dev/null +++ b/tuned_differ_x86_and_other_archs_in_cpu_plugin.patch @@ -0,0 +1,72 @@ +diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py +index 8f0babd..241e157 100644 +--- a/tuned/plugins/plugin_cpu.py ++++ b/tuned/plugins/plugin_cpu.py +@@ -7,6 +7,8 @@ import tuned.consts as consts + import os + import struct + import errno ++import platform ++import procfs + + log = tuned.logs.get() + +@@ -22,7 +24,11 @@ class CPULatencyPlugin(base.Plugin): + super(CPULatencyPlugin, self).__init__(*args, **kwargs) + + self._has_pm_qos = True +- self._has_energy_perf_bias = True ++ self._arch = "x86_64" ++ self._is_x86 = False ++ self._is_intel = False ++ self._is_amd = False ++ self._has_energy_perf_bias = False + self._has_intel_pstate = False + + self._min_perf_pct_save = None +@@ -58,6 +64,33 @@ class CPULatencyPlugin(base.Plugin): + "no_turbo" : None, + } + ++ def _check_arch(self): ++ intel_archs = [ "x86_64", "i686", "i585", "i486", "i386" ] ++ self._arch = platform.machine() ++ ++ if self._arch in intel_archs: ++ # Possible other x86 vendors (from arch/x86/kernel/cpu/*): ++ # "CentaurHauls", "CyrixInstead", "Geode by NSC", "HygonGenuine", "GenuineTMx86", ++ # "TransmetaCPU", "UMC UMC UMC" ++ cpu = procfs.cpuinfo() ++ vendor = cpu.tags.get("vendor_id") ++ if vendor is "GenuineIntel": ++ self._is_intel = True ++ elif vendor is "AuthenticAMD" or vendor is "HygonGenuine": ++ self._is_amd = True ++ else: ++ # We always assign Intel, unless we know better ++ self._is_intel = True ++ log.info("We are running on an x86 %s platform" % vendor) ++ else: ++ log.info("We are running on %s (non x86)" % self._arch) ++ ++ if self._is_intel is True: ++ # Check for x86_energy_perf_policy, ignore if not available / supported ++ self._check_energy_perf_bias() ++ # Check for intel_pstate ++ self._check_intel_pstate() ++ + def _check_energy_perf_bias(self): + self._has_energy_perf_bias = False + retcode_unsupported = 1 +@@ -110,10 +143,7 @@ class CPULatencyPlugin(base.Plugin): + else: + instance._load_monitor = None + +- # Check for x86_energy_perf_policy, ignore if not available / supported +- self._check_energy_perf_bias() +- # Check for intel_pstate +- self._check_intel_pstate() ++ self._check_arch() + else: + instance._first_instance = False + log.info("Latency settings from non-first CPU plugin instance '%s' will be ignored." % instance.name) From 7a33cd767d006436a5691ddf9b89922693b8776ce4ff06cd602ab23f54f77767 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 25 Jan 2019 11:22:32 +0000 Subject: [PATCH 4/6] A tuned_differ_x86_and_other_archs_in_cpu_plugin.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=60 --- tuned.changes | 1 + tuned.spec | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tuned.changes b/tuned.changes index d01de75..c69b349 100644 --- a/tuned.changes +++ b/tuned.changes @@ -5,6 +5,7 @@ Wed Jan 16 10:47:12 UTC 2019 - trenn@suse.de missing intel tool (x86_energy_perf_bias) - Remember arch and x86 CPU vendor to allow arch/vendor specific CPU tunings in the future (fate#326694) +A tuned_differ_x86_and_other_archs_in_cpu_plugin.patch ------------------------------------------------------------------- Fri Jan 11 18:26:17 UTC 2019 - trenn@suse.de diff --git a/tuned.spec b/tuned.spec index 73a2b16..0cbbfca 100644 --- a/tuned.spec +++ b/tuned.spec @@ -50,7 +50,8 @@ Requires: python3-linux-procfs Requires: python3-pyudev Requires: util-linux Obsoletes: pm-profiler -BuildArch: noarch +BuildArch: noarc +Requires: polkit %{?systemd_requires} %description From 0ef0947c4ec4165c7fa9eb10caa87d0b87224284a1d51280458c1d9fca1b6401 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 25 Jan 2019 11:40:30 +0000 Subject: [PATCH 5/6] - Require virt-what to be able to detect whether it is running on a virtual machine OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=61 --- tuned.changes | 2 ++ tuned.spec | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tuned.changes b/tuned.changes index c69b349..409496a 100644 --- a/tuned.changes +++ b/tuned.changes @@ -6,6 +6,8 @@ Wed Jan 16 10:47:12 UTC 2019 - trenn@suse.de - Remember arch and x86 CPU vendor to allow arch/vendor specific CPU tunings in the future (fate#326694) A tuned_differ_x86_and_other_archs_in_cpu_plugin.patch +- Require virt-what to be able to detect whether it is running + on a virtual machine ------------------------------------------------------------------- Fri Jan 11 18:26:17 UTC 2019 - trenn@suse.de diff --git a/tuned.spec b/tuned.spec index 0cbbfca..ffa4a63 100644 --- a/tuned.spec +++ b/tuned.spec @@ -49,9 +49,9 @@ Requires: python3-gobject Requires: python3-linux-procfs Requires: python3-pyudev Requires: util-linux +Requires: virt-what Obsoletes: pm-profiler BuildArch: noarc -Requires: polkit %{?systemd_requires} %description From a033f1382ee6ad399d5a5277ad0052dd408c0341ad36b3cfaefc6a5f87902778 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 25 Jan 2019 12:03:21 +0000 Subject: [PATCH 6/6] OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=62 --- tuned.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned.spec b/tuned.spec index ffa4a63..de2009d 100644 --- a/tuned.spec +++ b/tuned.spec @@ -51,7 +51,7 @@ Requires: python3-pyudev Requires: util-linux Requires: virt-what Obsoletes: pm-profiler -BuildArch: noarc +BuildArch: noarch %{?systemd_requires} %description