From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
David Scott <dave@recoil.org>
Subject: Re: [PATCH] oxenstored: fix short-write issue
Date: Mon, 2 Nov 2015 14:27:05 +0000 [thread overview]
Message-ID: <563772B9.4090406@citrix.com> (raw)
In-Reply-To: <1446474270.3088.51.camel@citrix.com>
On 02/11/15 14:24, Ian Campbell wrote:
> On Mon, 2015-11-02 at 14:10 +0000, Andrew Cooper wrote:
>> On 02/11/15 13:44, Ian Campbell wrote:
>>> On Tue, 2015-10-27 at 17:10 +0000, Wei Liu wrote:
>>>> When oxenstored wrote to the ring, it wrote a chunk of contiguous
>>>> data.
>>>> Originally when it tried to write across ring boundary, it returned a
>>>> short-write when there is still room. That led to stalling mini-os's
>>>> xenstore thread at times.
>>> What is a "short-write" in this context?
>>>
>>> Given data bytes 0..M I assumed it is only writing bytes 0..N and not
>>> N+1..M because the ring boundary is at N. But what is it writing to the
>>> ->prod ring pointer N or M?
>> Prod gets incremented by N in this case.
>>
>>> AIUI writing N should be allowed by the ring protocol, the client
>>> should
>>> keep looking for more data until it has a complete request.
>>>
>>> Writing M would be a server error.
>> Correct, and this is what is happening.
> The first or second? Your first comment suggests the first, but your second
> binds most closely to the second.
Oops yes. Writing M would be an error. Prod currently gets incremented
by N.
>
>> The server (believes) that the ring is full, when it is not. It waits
>> for the client to make more space in the ring, while the client is
>> waiting for the server to complete its message in the ring, thus
>> stalling.
> That makes sense, thanks.
>
> I think this needs to be spelled out more fully in the commit message, in
> particular "server thinks ring is full when it is not" is the most relevant
> thing, the short write is just how we arrived there.
This patch here is buggy, and superseeded by one of mine which attempts
to fix the C stubs.
I need to post a v2.
~Andrew
prev parent reply other threads:[~2015-11-02 14:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 17:10 [PATCH] oxenstored: fix short-write issue Wei Liu
2015-10-27 17:21 ` Samuel Thibault
2015-10-27 17:21 ` Andrew Cooper
2015-10-27 17:26 ` Samuel Thibault
2015-10-27 17:28 ` Samuel Thibault
2015-10-27 17:31 ` Samuel Thibault
2015-10-27 17:31 ` Andrew Cooper
2015-10-28 13:34 ` David Scott
2015-10-28 13:47 ` Samuel Thibault
2015-10-28 14:00 ` Andrew Cooper
2015-10-28 14:04 ` David Vrabel
2015-11-02 13:44 ` Ian Campbell
2015-11-02 14:10 ` Andrew Cooper
2015-11-02 14:24 ` Ian Campbell
2015-11-02 14:27 ` Andrew Cooper [this message]
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=563772B9.4090406@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=dave@recoil.org \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=samuel.thibault@ens-lyon.org \
--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).