Import from CS git
This commit is contained in:
parent
a1fedce997
commit
15d8db30ea
11
SOURCES/tuned-2.22.1-postgresql-disable-amd-instance.patch
Normal file
11
SOURCES/tuned-2.22.1-postgresql-disable-amd-instance.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff --git a/profiles/postgresql/tuned.conf b/profiles/postgresql/tuned.conf
|
||||||
|
index 88da8e4..4fd3810 100644
|
||||||
|
--- a/profiles/postgresql/tuned.conf
|
||||||
|
+++ b/profiles/postgresql/tuned.conf
|
||||||
|
@@ -55,3 +55,6 @@ sched_min_granularity_ns = 10000000
|
||||||
|
# "cache hot" and thus less likely to be re-migrated
|
||||||
|
# (system default is 500000, i.e. 0.5 ms)
|
||||||
|
sched_migration_cost_ns = 50000000
|
||||||
|
+
|
||||||
|
+[scheduler.amd]
|
||||||
|
+enabled=false
|
97
SOURCES/tuned-2.22.1-use-hdparm-lazily.patch
Normal file
97
SOURCES/tuned-2.22.1-use-hdparm-lazily.patch
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py
|
||||||
|
index 1438e35..d6feb06 100644
|
||||||
|
--- a/tuned/plugins/plugin_disk.py
|
||||||
|
+++ b/tuned/plugins/plugin_disk.py
|
||||||
|
@@ -100,19 +100,20 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
self._devices_supported = True
|
||||||
|
self._use_hdparm = True
|
||||||
|
self._free_devices = set()
|
||||||
|
- self._hdparm_apm_devices = set()
|
||||||
|
+ self._hdparm_apm_device_support = dict()
|
||||||
|
for device in self._hardware_inventory.get_devices("block"):
|
||||||
|
if self._device_is_supported(device):
|
||||||
|
self._free_devices.add(device.sys_name)
|
||||||
|
- if self._use_hdparm and self._is_hdparm_apm_supported(device.sys_name):
|
||||||
|
- self._hdparm_apm_devices.add(device.sys_name)
|
||||||
|
-
|
||||||
|
self._assigned_devices = set()
|
||||||
|
|
||||||
|
def _get_device_objects(self, devices):
|
||||||
|
return [self._hardware_inventory.get_device("block", x) for x in devices]
|
||||||
|
|
||||||
|
def _is_hdparm_apm_supported(self, device):
|
||||||
|
+ if not self._use_hdparm:
|
||||||
|
+ return False
|
||||||
|
+ if device in self._hdparm_apm_device_support:
|
||||||
|
+ return self._hdparm_apm_device_support[device]
|
||||||
|
(rc, out, err_msg) = self._cmd.execute(["hdparm", "-C", "/dev/%s" % device], \
|
||||||
|
no_errors = [errno.ENOENT], return_err=True)
|
||||||
|
if rc == -errno.ENOENT:
|
||||||
|
@@ -122,10 +123,13 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
elif rc:
|
||||||
|
log.info("Device '%s' not supported by hdparm" % device)
|
||||||
|
log.debug("(rc: %s, msg: '%s')" % (rc, err_msg))
|
||||||
|
+ self._hdparm_apm_device_support[device] = False
|
||||||
|
return False
|
||||||
|
elif "unknown" in out:
|
||||||
|
log.info("Driver for device '%s' does not support apm command" % device)
|
||||||
|
+ self._hdparm_apm_device_support[device] = False
|
||||||
|
return False
|
||||||
|
+ self._hdparm_apm_device_support[device] = True
|
||||||
|
return True
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@@ -232,7 +236,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
return not "standby" in out and not "sleeping" in out
|
||||||
|
|
||||||
|
def _instance_update_dynamic(self, instance, device):
|
||||||
|
- if not device in self._hdparm_apm_devices:
|
||||||
|
+ if not self._is_hdparm_apm_supported(device):
|
||||||
|
return
|
||||||
|
load = instance._load_monitor.get_device_load(device)
|
||||||
|
if load is None:
|
||||||
|
@@ -315,7 +319,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
# At the moment we support dynamic tuning just for devices compatible with hdparm apm commands
|
||||||
|
# If in future will be added new functionality not connected to this command,
|
||||||
|
# it is needed to change it here
|
||||||
|
- if device not in self._hdparm_apm_devices:
|
||||||
|
+ if not self._is_hdparm_apm_supported(device):
|
||||||
|
log.info("There is no dynamic tuning available for device '%s' at time" % device)
|
||||||
|
else:
|
||||||
|
super(DiskPlugin, self)._instance_apply_dynamic(instance, device)
|
||||||
|
@@ -350,7 +354,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
|
||||||
|
@command_set("apm", per_device=True)
|
||||||
|
def _set_apm(self, value, device, sim, remove):
|
||||||
|
- if device not in self._hdparm_apm_devices:
|
||||||
|
+ if not self._is_hdparm_apm_supported(device):
|
||||||
|
if not sim:
|
||||||
|
log.info("apm option is not supported for device '%s'" % device)
|
||||||
|
return None
|
||||||
|
@@ -366,7 +370,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
|
||||||
|
@command_get("apm")
|
||||||
|
def _get_apm(self, device, ignore_missing=False):
|
||||||
|
- if device not in self._hdparm_apm_devices:
|
||||||
|
+ if not self._is_hdparm_apm_supported(device):
|
||||||
|
if not ignore_missing:
|
||||||
|
log.info("apm option is not supported for device '%s'" % device)
|
||||||
|
return None
|
||||||
|
@@ -390,7 +394,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
|
||||||
|
@command_set("spindown", per_device=True)
|
||||||
|
def _set_spindown(self, value, device, sim, remove):
|
||||||
|
- if device not in self._hdparm_apm_devices:
|
||||||
|
+ if not self._is_hdparm_apm_supported(device):
|
||||||
|
if not sim:
|
||||||
|
log.info("spindown option is not supported for device '%s'" % device)
|
||||||
|
return None
|
||||||
|
@@ -406,7 +410,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||||
|
|
||||||
|
@command_get("spindown")
|
||||||
|
def _get_spindown(self, device, ignore_missing=False):
|
||||||
|
- if device not in self._hdparm_apm_devices:
|
||||||
|
+ if not self._is_hdparm_apm_supported(device):
|
||||||
|
if not ignore_missing:
|
||||||
|
log.info("spindown option is not supported for device '%s'" % device)
|
||||||
|
return None
|
@ -35,7 +35,7 @@
|
|||||||
Summary: A dynamic adaptive system tuning daemon
|
Summary: A dynamic adaptive system tuning daemon
|
||||||
Name: tuned
|
Name: tuned
|
||||||
Version: 2.22.1
|
Version: 2.22.1
|
||||||
Release: 5%{?prerel1}%{?dist}
|
Release: 6%{?prerel1}%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz
|
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz
|
||||||
# RHEL-8 specific recommend.conf:
|
# RHEL-8 specific recommend.conf:
|
||||||
@ -102,6 +102,10 @@ Patch2: tuned-2.22.1-profile-epyc-eda.patch
|
|||||||
# Update vm.max_map_count in the sap-netweaver profile (see RHEL-32124 for details)
|
# Update vm.max_map_count in the sap-netweaver profile (see RHEL-32124 for details)
|
||||||
Patch3: tuned-2.22.1-sap-vm-max-map-count.patch
|
Patch3: tuned-2.22.1-sap-vm-max-map-count.patch
|
||||||
Patch4: tuned-2.21.1-CVE-2024-52337.patch
|
Patch4: tuned-2.21.1-CVE-2024-52337.patch
|
||||||
|
# Make hdparm device checks lazy (see RHEL-71457 for details)
|
||||||
|
Patch5: tuned-2.22.1-use-hdparm-lazily.patch
|
||||||
|
# Disable the amd.scheduler plug-in instance in the postgresql profile (see RHEL-70470 for details)
|
||||||
|
Patch6: tuned-2.22.1-postgresql-disable-amd-instance.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The tuned package contains a daemon that tunes system settings dynamically.
|
The tuned package contains a daemon that tunes system settings dynamically.
|
||||||
@ -574,6 +578,12 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/tuned/ppd.conf
|
%config(noreplace) %{_sysconfdir}/tuned/ppd.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 06 2025 Pavol Žáčik <pzacik@redhat.com> - 2.22.1-6
|
||||||
|
- Make hdparm device checks lazy
|
||||||
|
Resolves: RHEL-71457
|
||||||
|
- Disable the amd.scheduler plug-in instance in the postgresql profile
|
||||||
|
Resolves: RHEL-70470
|
||||||
|
|
||||||
* Mon Nov 18 2024 Jaroslav Škarvada <jskarvad@redhat.com> - 2.22.1-5
|
* Mon Nov 18 2024 Jaroslav Škarvada <jskarvad@redhat.com> - 2.22.1-5
|
||||||
- Added sanity checks for API methods parameters, (CVE-2024-52337)
|
- Added sanity checks for API methods parameters, (CVE-2024-52337)
|
||||||
Resolves: RHEL-66614
|
Resolves: RHEL-66614
|
||||||
|
Loading…
Reference in New Issue
Block a user