From: David Vrabel <david.vrabel@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH 1/4] docs: Clarify the expected behaviour of zero length records
Date: Mon, 25 Jul 2016 11:44:50 +0100 [thread overview]
Message-ID: <5795EDA2.3090803@citrix.com> (raw)
In-Reply-To: <f0b6fd9c-06d1-6ece-ba09-0c7d46574804@citrix.com>
On 25/07/16 11:38, Andrew Cooper wrote:
> On 25/07/16 11:35, David Vrabel wrote:
>> On 25/07/16 11:25, Andrew Cooper wrote:
>>> On 25/07/16 11:21, David Vrabel wrote:
>>>> On 21/07/16 18:17, Andrew Cooper wrote:
>>>>> The sending side shouldn't send any variable sized records which end up having
>>>>> zero content, but the receiving side will need to tolerate such records for
>>>>> compatibility purposes.
>>>>>
>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>>> ---
>>>>> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
>>>>> CC: Wei Liu <wei.liu2@citrix.com>
>>>>> ---
>>>>> docs/specs/libxc-migration-stream.pandoc | 16 +++++++++++++++-
>>>>> 1 file changed, 15 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/docs/specs/libxc-migration-stream.pandoc b/docs/specs/libxc-migration-stream.pandoc
>>>>> index 31eba10..a90bc5d 100644
>>>>> --- a/docs/specs/libxc-migration-stream.pandoc
>>>>> +++ b/docs/specs/libxc-migration-stream.pandoc
>>>>> @@ -3,7 +3,7 @@
>>>>> Andrew Cooper <<andrew.cooper3@citrix.com>>
>>>>> Wen Congyang <<wency@cn.fujitsu.com>>
>>>>> Yang Hongyang <<hongyang.yang@easystack.cn>>
>>>>> -% Revision 1
>>>>> +% Revision 2
>>>>>
>>>>> Introduction
>>>>> ============
>>>>> @@ -631,6 +631,10 @@ The set of valid records depends on the guest architecture and type. No
>>>>> assumptions should be made about the ordering or interleaving of
>>>>> independent records. Record dependencies are noted below.
>>>>>
>>>>> +Some records have an exactly specified size. Some records have variable size
>>>>> +depending on their content. A record with variable size which ends up being
>>>>> +zero should be omitted entirely from the stream by the sending side.
>>>> I disagree. I think the stream should include the records with the empty
>>>> content. This gives better consistency and does not require changes to
>>>> the stream.
>>> There are already some which are properly omitted, like the vcpu records
>>> for offline vcpus.
>>>
>>> There is no point having empty records; omitting them is an optimisation
>>> which we absolutely shouldn't preclude.
>> The optimization doesn't matter since these records are so tiny.
>>
>> I've expanded on why these should be included in another reply.
>
> We already omit most zero-length records. That ship has already sailed.
>
> This bug only presents itself because of two hypercalls in Xen returning
> different size characteristics. We already checked for zero first, and
> fail to check for zero the second time.
Then document that those specific records may be omitted, but don't
spread the brokenness to other (future) records.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-25 10:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 17:17 [PATCH RFC 0/4] Fix issues with zero-length records in migration v2 Andrew Cooper
2016-07-21 17:17 ` [PATCH 1/4] docs: Clarify the expected behaviour of zero length records Andrew Cooper
2016-07-25 9:45 ` Wei Liu
2016-07-25 10:21 ` David Vrabel
2016-07-25 10:25 ` Andrew Cooper
2016-07-25 10:35 ` David Vrabel
2016-07-25 10:38 ` Andrew Cooper
2016-07-25 10:44 ` David Vrabel [this message]
2016-07-25 10:45 ` Andrew Cooper
2016-07-25 11:18 ` Ian Jackson
2016-07-21 17:17 ` [PATCH 2/4] tools/libxc: Tolerate zero-length records in migration v2 streams Andrew Cooper
2016-07-25 9:46 ` Wei Liu
2016-07-25 12:21 ` David Vrabel
2016-07-25 12:46 ` Andrew Cooper
2016-07-25 13:00 ` David Vrabel
2016-07-21 17:17 ` [PATCH 3/4] tools/libxc: Avoid generating inappropriate zero-length records Andrew Cooper
2016-07-25 9:45 ` Wei Liu
2016-07-25 9:57 ` Andrew Cooper
2016-07-25 10:14 ` Wei Liu
2016-07-25 10:32 ` David Vrabel
2016-07-25 11:44 ` Ian Jackson
2016-07-25 17:15 ` Ian Jackson
2016-07-26 9:23 ` Wei Liu
2016-07-26 13:37 ` Ian Jackson
2016-07-21 17:17 ` [PATCH 4/4] tools/python: Adjust migration v2 library to warn about " Andrew Cooper
2016-07-25 9:46 ` Wei Liu
2017-03-14 13:20 ` [PATCH RFC 0/4] Fix issues with zero-length records in migration v2 Julien Grall
2017-03-14 13:50 ` Andrew Cooper
2017-03-14 14:21 ` Wei Liu
2017-03-28 18:24 ` Julien Grall
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=5795EDA2.3090803@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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).