[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Could Xen hyperviosr be able to invoke Linux systemcalls?
On Mon, 2015-08-17 at 00:55 +0000, Kun Cheng wrote: > > > On Mon, Aug 17, 2015 at 12:16 AM Frediano Ziglio <freddy77@xxxxxxxxx> > > What I'm planing is adding page migration support for NUMA aware > scheduling. In such a case the most time I'll be dealing with Xen's > memory management & scheduling part to make relevant pages migrate to > another node with their VCPU. However, Linux kernel has already > implemented some basic mechanisms so the whole work would be better by > leveraging the kernel's existing code or functions. > No, not at all. As you figured (or at least had intuition about) yourself, Xen does run below Linux. Actually, it runs below any guest, including Dom0, which is a special guest but still a guest, and can even not be a Linux guest. So there's no code sharing, or no mechanism to invoke Linux code and have it affect Xen's scheduling or memory management (and never will be :-P). > More specifically, I want to confirm that could we use the code or > functions in linux kernel to assist the hypervisor? > No, it's the other way around. > My guess is not because in my understanding xen hypervisor lies under > the linux kernel, i.e. dom0's kernel. > Exactly. > Given that Dom0 is a special domain, if I want to manage & move all > the machine memory pages, can the kernel be helpful? > The Dom0 kernel doesn't know anything about the memory of other guest. It basically doesn't even know that they exist... That's the point of virtualization, isn't it? Also Linux's and Xen's scheduling and memory management are so different (and that's by design) that, even for similar (or the same) feature, the implementation will be different anyway, so sharing the code won't help at all. > Hmm, "change the memory from dom0" means we can control the VM's > memory by using a config file or xl command right? > "changing the memory from dom0" means something like "the dom0 can ask Xen, via toolstack, to do something to the memory of other guests", i.e., it has enough privileges to do that, but that's it. > What if we goes to the code level? I'm really confused now. Is Xen's > memory management complemented all by itsself or does it also receive > help from the kernel? > As said, Xen doesn't even know what kernel is actually running in the various guest, including dom0, and things should remains that way, especially for core things like scheduling and memory management. So, in summary, what you're after should be achieved entirely inside Xen. It is possible than, in the PV guest case, you'd need some help from the guest. However, that would be in the form of "Xen asking/forcing the guest to do something on the *guest* *itself*", not in the form of "Xen asking dom0 to do something on Xen's own memory/scheduling or (directly) on other guests' memory". Hope this helps clearing things out for you. :-) Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |