[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Feasability of a shared memory mapping filesystem

I'm curious about the feasability of a filesystem that makes memory maps
shared across domains. The reason for this is that, unless I'm mistaken,
it would mean that executables and shared libraries would share memory
across domains.

As I understand it, the file and its shared libraries are mapped into
virtual memory and (assuming no relocations are needed) those pages just
sit there as read only mmaps until needed, at which point pages of real
RAM are loaded with their contents. What I'm wondering is whether or not
those pages of real RAM could be shared across virtual domains using a
special filesystem, so that for those with a shared read-only /usr all
the xen domains would use the same pool of real RAM for executables,
rather than each one having their own private RAM pages with identical 
copies of libc.

With RAM so cheap these days, this may seem like a minor issue on xen
where the number of domains is comparitivly limited, but OTOH xen on x86
will most likely only ever support 4G of RAM now that both Intel and
AMD are moving to 64 bit chips, so there would seem to be some potential

Whether it's a read-only only filesystem or it works also for shared
writable mmaps is pretty much optional in my view, though interdomain
shared memory might be useful for some people (like web applications
where you don't want to use SQL or another networked database).

So, is this possible? If so, how difficult are we talking? Does xen have
a mechanism for sharing a page of memory between multiple domains, and
if so would there be any additional support required from xen or would
it just be a matter of implementing the xenolinux filesystem?

SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.