On Thu, Aug 16, 2012 at 01:08:52PM +0800, Lei Wen wrote:
Hi Nico,
On Thu, Aug 16, 2012 at 12:10 PM, Nicolas Pitre nicolas.pitre@linaro.org wrote:
On Thu, 16 Aug 2012, Lei Wen wrote:
Hi Dave,
On Thu, Aug 16, 2012 at 2:30 AM, Dave Martin dave.martin@linaro.org wrote:
In this kind of implementation, the hypervisor would be responsible for most aspects of power handling. The virtualisation support in the CPU allows CPUs to be hidden from Linux, and also allows CPU IDs and interrupt routing to be "faked" so that Linux does not see any change when it is migrated onto a different physical CPU by the hypervisor.
Linaro is currently working on a different implementation which gives Linux much more control over the whole process, and avoids the over- heads associated with using virtualisation for this purpose, but the code is not ready to be published yet.
Is it feasible to disclose in more details? What I can see is to move hypervisor code into kernel and install it at beginning like what KVM current does. While there is also heavy usage of secure monitor code in the switcher, does linaro also want to optimize them out?
That depends on the firmware to come with any given hardware implementation. If there is actually a Secore OS in that firmware then it is likely to assert control over all power up/down operations, in which case the sMCs can't be "optimized out".
I see.
But we can and did optimize out all the hypervisor code. You can have a look at this article for more details on the general design:
Do you mean current Linaro would not use the virt extension for the cluster switch? Or just put the hypervisor code inside the kernel?
We don't use the virtualisation extensions for this in our current code. It just becomes normal kernel code, analogous to subsystems like cpufreq and CPU hotplug.
Virtualisation is only really needed if we want to trick the OS into thinking that it is not really being migrated between different physical CPUs. This approach has the advantage that it can work with any OS, with no need for modifying the OS. But because we can modify Linux so that it understands and controls the switching, virtualisation is not needed.
This also makes it easier to use the virtualisation extensions for running true hypervisors like KVM, because we don't have to work out a way to let KVM and the switcher co-exist in hypervisor space.
Cheers ---Dave
http://lwn.net/Articles/481055/
Very good article indeed. :)
The code is available to Linaro members only for now and will be made public and submitted upstream in due course.
Nicolas
Thanks, Lei