You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the idea behind cpuplugd is useful in general, dynamically add resources when needed and remove them when not needed. And it shouldn't be difficult to use cpuplugd on platform other than s390x, with
diff --git a/cpuplugd/cpu.c b/cpuplugd/cpu.c
index a4456cf..e603137 100644
--- a/cpuplugd/cpu.c
+++ b/cpuplugd/cpu.c
@@ -24,7 +24,7 @@ int get_numcpus()
for (i = 0; ; i++) {
/* check whether file exists and is readable */
- sprintf(path, "/sys/devices/system/cpu/cpu%d/online", i);
+ sprintf(path, "/sys/devices/system/cpu/cpu%d", i);
if (access(path, R_OK) == 0)
number++;
else
it worked on my x86 machine (for the CPU part). Although more changes will be needed for a proper non-s390x support. I believe it would save power when used with modern multi-core CPUs like Power9 or some AArch64 ones.
Then cpuplugd might be another candidate for moving into util-linux package.
The text was updated successfully, but these errors were encountered:
I am a little surprised that Intel doesn't seem to have an online attribute for CPU 0, and the concept of "(de)configured" CPUs also seems to be missing, but it shouldn't be too difficult to adjust the cpuplugd code for this (at least get_numcpus(), get_num_online_cpus() and cpu_is_configured(), from a quick glance). The memory hotplug part using the s390-specific cmm memory balloon would also need to be disabled for other archs, or maybe rewritten to use the generic sysfs memory hotplug interface.
I currently don't have resources for this, and I also wonder if there really would be demand for this on other architectures, so that it would be worth the effort. If you want to spend the effort, feel free to send a pull request with the complete changes, or maybe even move it to util-linux.
I'm planning to play with it more seriously when I get my Power9-based based workstation to save some power/electricity :-) Will let you know about the results.
I think the idea behind cpuplugd is useful in general, dynamically add resources when needed and remove them when not needed. And it shouldn't be difficult to use cpuplugd on platform other than s390x, with
it worked on my x86 machine (for the CPU part). Although more changes will be needed for a proper non-s390x support. I believe it would save power when used with modern multi-core CPUs like Power9 or some AArch64 ones.
Then cpuplugd might be another candidate for moving into util-linux package.
The text was updated successfully, but these errors were encountered: