From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>
Subject: Re: [PATCH] libvchan: interdomain communications library
Date: Wed, 24 Aug 2011 14:52:52 -0400 [thread overview]
Message-ID: <4E554884.1040109@tycho.nsa.gov> (raw)
In-Reply-To: <1314004557.5010.411.camel@zakaz.uk.xensource.com>
On 08/22/2011 05:15 AM, Ian Campbell wrote:
> Hi Daniel,
>
> On Fri, 2011-08-19 at 15:38 +0100, Daniel De Graaf wrote:
>
> Please could you say a few words about the functionality this new
> library enables and perhaps the design etc? In particular a protocol
> spec would be useful for anyone who wanted to reimplement for another
> guest OS etc. In particular memory barriers are conspicuous in their
> absence.
Agreed, barriers are needed for a robust implementation. Since this is
a shared library and not xen or kernel code, the existing barrier()/wmb()
functions are not available. The only existing implementations in Xen
appear to expand to asm("":::"memory") which does not actually implement
a memory barrier (i.e. MFENCE or similar opcodes). The __sync_synchronize()
compiler intrinsic properly implements these barriers and has been used.
The lack of memory fencing in xen seems to be a topic for another thread.
> I didn't review in detail but it seems like you have invented your own
> ring datastructures rather than using the standard ring.h ones. I think
> this needs some justification
(this has been added as a comment)
The ring.h macros define an asymmetric interface to a shared data structure
that assumes all rings reside in a single contiguous memory space. This is
not suitable for vchan because the interface to the ring is symmetric except
for the setup. Unlike the producer-consumer rings defined in ring.h, the
size of the rings used in vchan are determined at execution time instead of
compile time, so the macros in ring.h cannot be used to access the rings.
> I think it would be appropriate to add protocol.txt at the same time as
> checking in the library.
The comments in the shared header file explain the layout of the shared
memory regions; any other parts of the protocol are application-defined.
> In one of the headers it says "The grant reference is expected to be
> shared through some out-of-band mechanism such as XenStore." but the
> library appears to implement the xenstore stuff internally.
Comment has been updated to point to the xenstore path used.
>> tools/libvchan/gntalloc.h | 82 ++++++++
>> tools/libvchan/gntdev.h | 150 ++++++++++++++
>
> If these define a Linux ioctl interface then they should go in
> tools/include/xen-sys/Linux/.
>
>> tools/libvchan/libvchan.h | 141 +++++++++++++
>
> I presume that somewhere in there a shared datastructure is defined. In
> which case that might be better off added to xen/include/public/io/
> instead.
>
> Cheers,
> Ian.
>
>
I'm sending an updated patch with these revisions in a separate email.
--
Daniel De Graaf
National Security Agency
next prev parent reply other threads:[~2011-08-24 18:52 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 14:38 [PATCH] libvchan: interdomain communications library Daniel De Graaf
2011-08-22 7:40 ` Vasiliy G Tolstov
2011-08-24 19:28 ` Konrad Rzeszutek Wilk
2011-08-22 9:15 ` Ian Campbell
2011-08-24 18:52 ` Daniel De Graaf [this message]
2011-08-25 10:27 ` Tim Deegan
2011-08-25 18:36 ` Jeremy Fitzhardinge
2011-08-24 18:52 ` [PATCH v2] " Daniel De Graaf
2011-08-26 14:01 ` Ian Jackson
2011-08-29 18:48 ` [PATCH v3] " Daniel De Graaf
2011-08-30 10:32 ` Ian Campbell
2011-08-31 19:17 ` Daniel De Graaf
2011-09-01 16:28 ` Ian Campbell
2011-09-01 16:47 ` Daniel De Graaf
2011-09-01 16:56 ` Ian Jackson
2011-09-01 17:46 ` Daniel De Graaf
2011-09-01 16:22 ` [PATCH v4 0/3] " Daniel De Graaf
2011-09-01 16:22 ` [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify Daniel De Graaf
2011-09-01 19:29 ` Konrad Rzeszutek Wilk
2011-09-01 16:22 ` [PATCH 2/3] libxc: add xc_gntshr_* functions Daniel De Graaf
2011-09-01 19:24 ` Konrad Rzeszutek Wilk
2011-09-01 16:22 ` [PATCH 3/3] libvchan: interdomain communications library Daniel De Graaf
2011-09-19 22:43 ` [PATCH v5 0/3] Daniel De Graaf
2011-09-19 22:43 ` [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify Daniel De Graaf
2011-09-21 10:03 ` Ian Campbell
2011-09-21 15:02 ` Daniel De Graaf
2011-09-21 15:25 ` Ian Campbell
2011-09-21 17:07 ` Daniel De Graaf
2011-09-22 8:32 ` Ian Campbell
2011-09-22 18:09 ` Daniel De Graaf
2011-09-19 22:43 ` [PATCH 2/3] libxc: add xc_gntshr_* functions Daniel De Graaf
2011-09-21 10:13 ` Ian Campbell
2011-09-19 22:43 ` [PATCH 3/3] libvchan: interdomain communications library Daniel De Graaf
2011-09-21 10:53 ` Ian Campbell
2011-09-21 16:31 ` Daniel De Graaf
2011-09-22 8:18 ` Ian Campbell
2011-09-21 13:44 ` Ian Campbell
2011-09-22 22:14 ` [PATCH v6 0/3] libxenvchan: " Daniel De Graaf
2011-09-22 22:14 ` [PATCH 1/3] libxc: add xc_gnttab_map_grant_ref_notify Daniel De Graaf
2011-09-30 9:16 ` Ian Campbell
2011-09-30 14:12 ` Ian Jackson
2011-09-30 14:17 ` Ian Campbell
2011-09-22 22:14 ` [PATCH 2/3] libxc: add xc_gntshr_* functions Daniel De Graaf
2011-09-22 22:14 ` [PATCH 3/3] libvchan: interdomain communications library Daniel De Graaf
2011-09-30 7:51 ` [PATCH v6 0/3] libxenvchan: " Vasiliy Tolstov
2011-09-30 8:28 ` Vasiliy Tolstov
2011-09-30 14:40 ` Daniel De Graaf
2011-11-24 20:02 ` Anil Madhavapeddy
2011-11-25 16:53 ` Daniel De Graaf
2011-11-25 16:54 ` [PATCH] libxc: Fix checks on grant notify arguments Daniel De Graaf
2011-12-01 18:20 ` Ian Jackson
2011-11-25 16:56 ` [PATCH 1/2] xen/events: prevent calling evtchn_get on invlaid channels Daniel De Graaf
2011-11-25 16:56 ` [PATCH 2/2] xen/gntalloc: release grant references on page free Daniel De Graaf
2011-11-25 18:37 ` [PATCH] xen/gntalloc: fix reference counts on multi-page mappings Daniel De Graaf
2011-09-30 8:34 ` [PATCH v6 0/3] libxenvchan: interdomain communications library Ian Campbell
2011-09-30 8:37 ` [PATCH] libxc: osdep: report missing backends in common code Ian Campbell
2011-10-06 18:44 ` [PATCH v6 0/3] libxenvchan: interdomain communications library Ian Jackson
2011-10-07 8:41 ` Roger Pau Monné
2011-10-07 9:15 ` Keir Fraser
2011-10-07 9:48 ` Ian Jackson
2011-10-07 10:22 ` Roger Pau Monné
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=4E554884.1040109@tycho.nsa.gov \
--to=dgdegra@tycho.nsa.gov \
--cc=Ian.Campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.