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

Re: [Xen-devel] Any work on sharing of large multi-page segments?



>>> On 15.03.15 at 09:37, <andreww591@xxxxxxxxx> wrote:
> Has anyone done any work on sharing of large multiple-page segments 
> between domains? The current grant table implementation is unsuitable 
> for this because it only allows sharing single pages and is limited to a 
> relatively small number of entries (and passing large numbers of 
> single-page grant references between domains for a segment might get slow).
> 
> I am planning to write a paravirtualized OpenGL impelmentation that will 
> use a ring buffer for commands and shared memory for passing buffers 
> between front end and back end, rather than trying to push everything 
> through a socket as VMGL and Chromium do (using sockets to push OpenGL 
> buffers between VMs on the same machine is kind of ridiculous when you 
> could just use shared memory segments). Something like this pretty much 
> requires the ability to grant multi-page segments.

So where do you expect the major performance / scalability
improvement to be gained? Internally to Xen, each page will need
to be tracked separately anyway, as what appears physically
contiguous in the granting guest may (and likely will) not be
contiguous in machine memory (i.e. from Xen's perspective).
Furthermore the public interface is currently written such that
grant lengths must be less than 64k. I.e. already at the very
simple first steps you'd be faced with implementing bigger length
counterparts of (almost) all existing interfaces.

> Another use of segment grants would be sharing of code between driver 
> domains to reduce memory footprint. I am wanting to put together a Xen 
> system where dom0 is a stub domain (running a single-process embedded 
> OS) that just provides xenstore and starts and stops domains (based on 
> requests from a domU), and there is a separate domain for each driver 
> (based on a cut-down Linux system, and maybe also optionally on the same 
> single-process OS as dom0, with the NetBSD rump kernel PCI drivers 
> ported to it). Since there will be several service domains, using 
> segments to share code between them would reduce the memory footprint 
> somewhat (for sharing kernel code these would presumably require some 
> kind of small bootstrap to map the grant reference).

No, grants are explicitly not intended to be used for code (or data)
sharing, only for data exchange: They're being mapped with the
executable flag clear. For code and (read-only) data sharing you'll
want to use the page sharing facility instead.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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