From: Wei Liu <wei.liu2@citrix.com>
To: Stefano Stabellini <stefano@aporeto.com>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
wei.liu2@citrix.com
Subject: Re: [DOC v2] Xen transport for 9pfs
Date: Mon, 12 Dec 2016 12:00:04 +0000 [thread overview]
Message-ID: <20161212120004.GS2709@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1612051729350.6598@sstabellini-ThinkPad-X260>
On Mon, Dec 05, 2016 at 05:33:23PM -0800, Stefano Stabellini wrote:
[...]
> ## Xenstore
>
> The frontend and the backend connect via xenstore to exchange
> information. The toolstack creates front and back nodes with state
> [XenbusStateInitialising]. The protocol node name is **9pfs**.
>
> Multiple rings are supported for each frontend and backend connection.
>
It would help if you can state if a specific node is mandatory or
optional.
> ### Frontend XenBus Nodes
> ### Backend XenBus Nodes
[...]
> The producer always notifies the consumer after incrementing **prod**.
> However in some circumstances the producer is allowed not to notify the
> consumer, just as a performance improvement, and still maintain
> correctness. These are the steps to do it: after incrementing *prod*,
> the producer reads *cons* a second time; if the value is changed from
> the previous read and it is different from *prod* before the update,
> then the notification can be avoided. These are the producer steps, with
> the optimization:
>
> - read *prod* (old_prod), *cons* (old_cons) from shared memory
> - general memory barrier
> - verify *prod* against local copy (consumer shouldn't change it)
> - write to array at position *prod* up to *cons*, wrapping around the circular
> buffer when necessary
> - write memory barrier
> - increase *prod* (new_prod)
> - general memory barrier
> - read *cons* (new_cons)
> - if new_cons == old_cons or new_cons == old_prod, then notify the
> consumer
>
I think it would be valuable to extract this section to a generic "how
to write driver" doc. But that's probably something for another day.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-12-12 12:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 1:33 [DOC v2] Xen transport for 9pfs Stefano Stabellini
2016-12-12 12:00 ` Wei Liu [this message]
2016-12-12 19:39 ` Stefano Stabellini
2017-01-04 21:49 ` Oleksandr Andrushchenko
2017-01-04 21:47 ` Oleksandr Andrushchenko
2017-01-05 19:38 ` Stefano Stabellini
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=20161212120004.GS2709@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=stefano@aporeto.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).