From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Wei Liu <wei.liu2@citrix.com>, Stefano Stabellini <stefano@aporeto.com>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com
Subject: Re: [DOC v2] Xen transport for 9pfs
Date: Wed, 4 Jan 2017 23:49:15 +0200 [thread overview]
Message-ID: <625dd269-a336-a176-02da-458acfb46a01@gmail.com> (raw)
In-Reply-To: <20161212120004.GS2709@citrix.com>
On 12/12/2016 02:00 PM, Wei Liu wrote:
> 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.
I do support this idea which will save lots of time and efforts
for the PV developers...
> Wei.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-01-04 21:49 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
2016-12-12 19:39 ` Stefano Stabellini
2017-01-04 21:49 ` Oleksandr Andrushchenko [this message]
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=625dd269-a336-a176-02da-458acfb46a01@gmail.com \
--to=andr2000@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=stefano@aporeto.com \
--cc=wei.liu2@citrix.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).