From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Javier Guerra <javier-796Irmz5ZkZBDgjK7y7TUQ@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Memory sharing among guest OSs
Date: Fri, 30 Nov 2007 09:12:18 +0200 [thread overview]
Message-ID: <474FB7D2.3040107@qumranet.com> (raw)
In-Reply-To: <90eb1dc70711280812r7c55d15ehacf2645c0a42ae81-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Javier Guerra wrote:
> On 11/28/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 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
prev parent reply other threads:[~2007-11-30 7:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 10:52 Memory sharing among guest OSs Haifeng He
[not found] ` <ab08258e0711280252n5e72267q7c18c3ea254916b2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-28 15:39 ` Avi Kivity
[not found] ` <474D8B97.6090100-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-28 16:12 ` Javier Guerra
[not found] ` <90eb1dc70711280812r7c55d15ehacf2645c0a42ae81-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-30 7:12 ` Avi Kivity [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=474FB7D2.3040107@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=javier-796Irmz5ZkZBDgjK7y7TUQ@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox