1
0
Fork 0
This commit is contained in:
Marek Mahut 2026-05-29 16:15:29 +00:00 committed by GitHub
commit ef51306dbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -430,7 +430,13 @@ class CPULatencyPlugin(hotplug.Plugin):
return
load = instance._load_monitor.get_load()["system"]
if load < instance.options["load_threshold"]:
try:
load_threshold = float(instance.options["load_threshold"])
except (ValueError, TypeError):
log.error("invalid load_threshold value '%s', skipping dynamic latency update"
% instance.options["load_threshold"])
return
if load < load_threshold:
self._set_latency(instance.options["latency_high"])
else:
self._set_latency(instance.options["latency_low"])