From ff6b17945529a30fdbe6fac5d19d5adf58f36c6a Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 6 Dec 2012 18:41:06 +0100 Subject: [PATCH] cpu plugin: use hardware enumeration --- tuned/plugins/plugin_cpu.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py index 0b6065e..837b15f 100644 --- a/tuned/plugins/plugin_cpu.py +++ b/tuned/plugins/plugin_cpu.py @@ -15,10 +15,8 @@ class CPULatencyPlugin(base.Plugin): """ @classmethod - def tunable_devices(self): - files = os.listdir("/sys/devices/system/cpu") - cpus = fnmatch.filter(files, "cpu[0-9]*") - return map(lambda name: name[3:], cpus) + def device_requirements(self): + return {"subsystem": "cpu"} def _post_init(self): self._latency = None