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

Re: [Xen-devel] [PATCH] xen: add gntdev



On Wed, Nov 28, 2012 at 02:19:48PM +0100, Roger Pau Monne wrote:
> This is a basic (and experimental) gntdev implementation for NetBSD.
> 
> The gnt device allows usermode applications to map grant references in
> userspace. It is mainly used by Qemu to implement a Xen backend (that
> runs in userspace).
> 
> Due to the fact that qemu-upstream is not yet functional in NetBSD,
> the only way to try this gntdev is to use the old qemu
> (qemu-traditional).
> 
> Performance is not that bad (given that we are using qemu-traditional
> and running a backend in userspace), the throughput of write
> operations is 64.7 MB/s, while in the Dom0 it is 104.6 MB/s. Regarding
> read operations, the throughput inside the DomU is 76.0 MB/s, while on
> the Dom0 it is 108.8 MB/s.
> 
> Patches to libxc and libxl are also comming soon.
> 
> [...]
> +map_grant_ref(struct gntmap *map);

please, prefix all struct, global variables and functions of the
driver with gnt

> +             if (pmap_extract_ma(pmap_kernel(), k_va, &ma) == false) {
> +                     debug("unable to extract kernel MA");
> +                     return EFAULT;
> +             }

Can't you get the pa or ma directly from the grant reference ?
Adding a kernel mapping only to run pmap_extract_ma() on it looks like an
innefficient way of doing it (this will require TLB shootdown IPIs).

Or maybe GNTTABOP_map_grant_ref could map directly in user space ?

-- 
Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
     NetBSD: 26 ans d'experience feront toujours la difference
--

_______________________________________________
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®.