diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py index 0d7bce64..6b701b84 100644 --- a/tuned/plugins/plugin_cpu.py +++ b/tuned/plugins/plugin_cpu.py @@ -582,7 +582,7 @@ def _set_sampling_down_factor(self, sampling_down_factor, device, instance, sim, self._governors_map.clear() self._governors_map[device] = None - governor = self._get_governor(device) + governor = self._get_governor(device, instance) if governor is None: log.debug("ignoring sampling_down_factor setting for CPU '%s', cannot match governor" % device) return None @@ -600,7 +600,7 @@ def _set_sampling_down_factor(self, sampling_down_factor, device, instance, sim, @command_get("sampling_down_factor") def _get_sampling_down_factor(self, device, instance, ignore_missing=False): - governor = self._get_governor(device, ignore_missing=ignore_missing) + governor = self._get_governor(device, instance, ignore_missing=ignore_missing) if governor is None: return None path = self._sampling_down_factor_path(governor) diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py index f4d94d92..207b964f 100644 --- a/tuned/plugins/plugin_disk.py +++ b/tuned/plugins/plugin_disk.py @@ -456,17 +456,17 @@ def _multiply_readahead(self, enabling, multiplier, device, verify, ignore_missi command_name = "readahead_multiply", device_name = device) if enabling: - old_readahead = self._get_readahead(device) + old_readahead = self._get_readahead(device, instance) if old_readahead is None: return new_readahead = int(float(multiplier) * old_readahead) self._storage.set(storage_key, old_readahead) - self._set_readahead(new_readahead, device, False) + self._set_readahead(new_readahead, device, instance, False) else: old_readahead = self._storage.get(storage_key) if old_readahead is None: return - self._set_readahead(old_readahead, device, False) + self._set_readahead(old_readahead, device, instance, False) self._storage.unset(storage_key) def _scheduler_quantum_file(self, device): diff --git a/tuned/plugins/plugin_scheduler.py b/tuned/plugins/plugin_scheduler.py index 24666e48..9f3489aa 100644 --- a/tuned/plugins/plugin_scheduler.py +++ b/tuned/plugins/plugin_scheduler.py @@ -1510,11 +1510,11 @@ def _set_sched_min_granularity_ns(self, value, instance, sim, remove): @command_get("sched_base_slice_ns") def _get_sched_base_slice_ns(self, instance): - return self._get_sched_min_granularity_ns() + return self._get_sched_min_granularity_ns(instance) @command_set("sched_base_slice_ns") def _set_sched_base_slice_ns(self, value, instance, sim, remove): - return self._set_sched_min_granularity_ns(value, sim, remove) + return self._set_sched_min_granularity_ns(value, instance, sim, remove) @command_get("sched_latency_ns") def _get_sched_latency_ns(self, instance): diff --git a/tuned/plugins/plugin_video.py b/tuned/plugins/plugin_video.py index b71097a0..2122539b 100644 --- a/tuned/plugins/plugin_video.py +++ b/tuned/plugins/plugin_video.py @@ -85,7 +85,7 @@ def _files(self, device): "panel_power_savings": "/sys/class/drm/%s/amdgpu/panel_power_savings" % device, } - def apply_panel_power_saving_target(self, device, target, sim=False): + def apply_panel_power_saving_target(self, device, target, instance, sim=False): """Apply the target value to the panel_power_savings file if it doesn't already have it""" # if we don't have the file, we might be radeon not amdgpu @@ -93,7 +93,7 @@ def apply_panel_power_saving_target(self, device, target, sim=False): return None # make sure the value is different (avoids unnecessary kernel modeset) - current = int(self._get_panel_power_savings(device)) + current = int(self._get_panel_power_savings(device, instance)) if current == target: log.info( "panel_power_savings for %s already %s" % (device, target) @@ -167,7 +167,7 @@ def _set_panel_power_savings(self, value, device, instance, sim, remove): log.warning("Invalid value %s for panel_power_savings" % value) return None if value in range(0, 5): - return self.apply_panel_power_saving_target(device, value, sim) + return self.apply_panel_power_saving_target(device, value, instance, sim) else: log.warning("Invalid value %s for panel_power_savings" % value) return None diff --git a/tuned/plugins/plugin_vm.py b/tuned/plugins/plugin_vm.py index c4b50f3e..8e4beaea 100644 --- a/tuned/plugins/plugin_vm.py +++ b/tuned/plugins/plugin_vm.py @@ -103,7 +103,7 @@ def _set_transparent_hugepages(self, value, instance, sim, remove): # just an alias to transparent_hugepages @command_set("transparent_hugepage") def _set_transparent_hugepage(self, value, instance, sim, remove): - self._set_transparent_hugepages(value, sim, remove) + self._set_transparent_hugepages(value, instance, sim, remove) @command_get("transparent_hugepages") def _get_transparent_hugepages(self, instance): @@ -116,7 +116,7 @@ def _get_transparent_hugepages(self, instance): # just an alias to transparent_hugepages @command_get("transparent_hugepage") def _get_transparent_hugepage(self, instance): - return self._get_transparent_hugepages() + return self._get_transparent_hugepages(instance) @command_set("transparent_hugepage.defrag") def _set_transparent_hugepage_defrag(self, value, instance, sim, remove):