cpupower: Better detect offlined CPUs
Before, checking for offlined CPUs was done dirty and it was checked whether topology parsing returned -1 values. But this is a valid case on a Xen (and possibly other) kernels. Do proper online/offline checking, also take CONFIG_HOTPLUG_CPU option into account (no /sys/devices/../cpuX/online file). Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:

committed by
Dominik Brodowski

parent
88f984e0e2
commit
7c74d2bc5a
@@ -7,6 +7,8 @@
|
||||
|
||||
extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
|
||||
|
||||
extern int sysfs_is_cpu_online(unsigned int cpu);
|
||||
|
||||
extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu,
|
||||
unsigned int idlestate);
|
||||
extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu,
|
||||
|
Reference in New Issue
Block a user