plugins: Add missing instance parameters
These were all forgotten in 6def0e4.
This commit is contained in:
parent
374697b09f
commit
76464d8df1
5 changed files with 12 additions and 12 deletions
|
|
@ -582,7 +582,7 @@ class CPULatencyPlugin(hotplug.Plugin):
|
|||
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 @@ class CPULatencyPlugin(hotplug.Plugin):
|
|||
|
||||
@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)
|
||||
|
|
|
|||
|
|
@ -456,17 +456,17 @@ class DiskPlugin(hotplug.Plugin):
|
|||
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):
|
||||
|
|
|
|||
|
|
@ -1528,11 +1528,11 @@ class SchedulerPlugin(base.Plugin):
|
|||
|
||||
@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):
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class VideoPlugin(base.Plugin):
|
|||
"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 @@ class VideoPlugin(base.Plugin):
|
|||
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 @@ class VideoPlugin(base.Plugin):
|
|||
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
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class VMPlugin(base.Plugin):
|
|||
# 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 @@ class VMPlugin(base.Plugin):
|
|||
# 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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue