Re: RFC: multiple address spaces for one process
From: Jeremy Fitzhardinge <hidden>
Date: 2007-06-29 14:32:01
Also in:
linux-mm
Peter Chubb wrote:
In a hosted VMM like LinuxOnLinux or UML, context switch time can be a major problem (as mmap when repeated for each guest page frame takes a long time). One solution is to allow the host kernel to keep a cache of address space contexts, and switch between them in a single operation.
Other VMMs which have a large usermode component, like lguest and kvm,
do maintain two address spaces mapping the same set of pages. But
unlike UML (and I guess LoL), the guest mappings are not represented as
VMAs, but just as a raw processor pagetable. They need some special
switcher code to go into that state, so it doesn't look like this would
be terribly useful for them.
Am I right in presuming that this is really only useful for VMMs which
want to use mmap/mprotect/munmap for the virtual MMU implementation?
It might be interesting if the two cases could be unified in some way,
so that the VMMs could use a common usermode mechanism to achieve the
same end, which is what Carsten was proposing. But its not obvious to
me how much common mechanism can be pulled out, since its a pretty
deeply architecture-specific operation.
J