Javier Guerra wrote:
> On 11/28/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
>   
>> Haifeng He wrote:
>>     
>>> I am pretty new to KVM. I have a question which is if it
>>> is possible (or easy) to share memory(such identical pages)
>>> among guest OSs in KVM?
>>>       
>> In KVM, guest memory is normal userspace memory.  So you can use any of
>> the standard Linux shared memory mechanisms to share memory among guests.
>>     
>
> so the question would be if QEMU has any mechanism to setup that
> shared memory, right?
>
>   

Right now, it doesn't.

> if so, how would that look to the guest OS?
>
>   

If done naively, part of guest memory would be shared among other
guests.  Unless the guest was modified to handle it, it would crash
fairly quickly.

One way to do it right is to define a "memory extension pci card" (say,
'qemu -memory-card /dev/shm/shared_mem -hda ...' to insert it into the
guest), and a guest PCI driver for it would map the memory into the
guest address space.  This should be fairly easy to do.

> i guess it would be nice if the "-net user" facility could emulate an
> RDMA-capable card using real shared memory, but AFAIK, RDMA doesn't
> look exactly like remote shared memory.
>
>   

No, RDMA is not transparent, while shared memory is.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to