Hi This email intend to an early discussion on the possibility of porting powertop to Xen, i.e. run powertop in Xen domain0 and get similar info as normal linux.
As we are busy developing the C/P feature in Xen, we realize that a user-level statistics tool like powertop is very useful for power tuning, and this make us to consider if it is possible to port powertop for xen. Besides statistics, powertop also provide suggestion on I/O device (e.g. wireless, usb, sata), this is also beneficial to Xen domain0. >From implementation point of view, powertop do the following things (correct me if I miss something) 1. Firstly get the data from kernel in various way, e.g. proc fs, sysfs, 2. Then analysis these data, 3. Finally show the result in a user friendly way. To port powertop to Xen, the major porting effort is the first part: getting data from kernel. In Xen domain0, many interface is missing. Take C state info as example, there is no /proc/acpi/processor/CPUx/power in domain0, because C state handling is not in dom0 kernel, instead in hypervisor. So for those missing interface, we plan to provide hypercall for powertop to get data directly from hypervisor. Here is the detail: - C state related info: use hypercall to get same data as /proc/acpi/processor/CPU/Cx - P state related info: use hypercall to get same data as /sys/devices/system/cpu/%s/cpufreq/ - interrupt related info: it is a little bit complext, since /proc/timer_stats provide quite comprehensive info, we need think more here. - I/O device related info: still use original interface, since dom0 also own the I/O device. This is the early thought we have, and any comments is welcome. Best Regards Ke _______________________________________________ Power mailing list [email protected] http://www.bughost.org/mailman/listinfo/power
