From: Martin J. B. <mb...@ar...> - 2003-04-18 14:26:35
|
> Hi, > Just thought i'd let you know how progress is going. I have been looking > at the memory mapping in user-mode-linux. It uses mmap and mprotect to > provide an implementation of malloc. mprotect will deliver SIGSEGV to the > process if a not-permitted access occurs. This means a simple > implementation would copy a page from the current owner on SIGSEGV, using > mprotect to intercept access. To reduce latency it would be better if > each node had a table of current owners of all global pages - for a 32bit > address space that would take approx 4M. The bit I don't quite understand > yet is how UML deals with physical address translation. Each process > under UML appears to be a real process on the underlying kernel, in which > case UML has no access to the physical address space... This could be a > problem, unless a segmented memory approach is used, ie we use the UML > process ID concatenated with the process address to form a > virtual-global-address. This would mean out total memory for our virtual > NUMA machine could exceed 4G - which is odd... I haven't looked into how > UML implements shared memory yet - but I assume it will use a shared > mmap... If it does then mprotect should be sufficent for this. It seems that the way vmware & other virtualisation layers do this is to replace the pagetable manipulation operations to trick the guest OS into thinking they are maniuplating their pagetables, but lying to them about what's there, whilst snidily manipulating the real pagetables underneath. M. |