From: Juan Quintela <quintela@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 0/5] Migration subsections (and ide as example)
Date: Tue, 15 Jun 2010 16:19:14 +0200 [thread overview]
Message-ID: <m339wo750d.fsf@trasno.mitica> (raw)
In-Reply-To: <4C178980.4020202@codemonkey.ws> (Anthony Liguori's message of "Tue, 15 Jun 2010 09:09:04 -0500")
Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 06/15/2010 08:31 AM, Juan Quintela wrote:
>> Hi
>>
>> At the end, here is the migration subsections implementation. As an example I ported the last
>> two ide changes to migration to work with subsections. Notes:
>>
>> - subsections
>> I went for qemu_peek_byte() insteadof adding a subsection part in
>> qemu_loadvm_state() due to two reasons:
>> - it makes mandatory that subsections came after sections (better for error messages)
>> - it makes post_load() for the section to be run after subsections are loaded.
>> I think that running section post_load() and then subsections can make for some subtle
>> errors.
>> How does it works?
>> We have a new array of subsections at the end of each section (it can be NULL).
>> Each subsection is composed of VMStateDescription and a test function. test function
>> checks if subsection is needed or not. if needed, it is just emmited.
>> On load, we peek to see if after a section is loaded, if there is any subsection
>> at the end, and if so, we search for it on this section subsections.
>>
>>
>> - ide: 1st revert is not clear because there has been posterior changes that I honored.
>> only change done is that ide_dummy_transfer_stop to transfer_end_table for it to be
>> complete.
>>
>> - testing. In normal operation this code is not triggered (one of the reason for not wanting to
>> sent it in the 1st place). I used patch attached at the end to trigger it.
>>
>> Commetnts?
>>
>
> Obviously, we can't change IDE like this but the implementation looks
> pretty sane.
Why? nothing has been released with 0.12.[34], and that is what broke
migration in the 1st place.
> Can you add something to docs/ that explains how this
> works? My only concern is that the code doesn't make it obvious what
> a subsection is, when to use it, and why it's safe from an
> implementation perspective.
Agreed, wanted to see if I got some comments 1st.
Will resend tomorrow with some documentantion.
> Very nice solution though.
Thanks.
Later, Juan.
prev parent reply other threads:[~2010-06-15 14:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 13:31 [Qemu-devel] [PATCH 0/5] Migration subsections (and ide as example) Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 1/5] Revert "ide save/restore pio/atapi cmd transfer fields and io buffer" Juan Quintela
2010-06-15 13:51 ` Avi Kivity
2010-06-15 13:31 ` [Qemu-devel] [PATCH 2/5] Revert "ide save/restore current transfer fields" Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 3/5] vmstate: add subsections code Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 4/5] ide: fix migration in the middle of pio operation Juan Quintela
2010-06-15 13:31 ` [Qemu-devel] [PATCH 5/5] ide: fix migration in the middle of a bmdma transfer Juan Quintela
2010-06-15 13:59 ` Avi Kivity
2010-06-15 14:05 ` [Qemu-devel] " Juan Quintela
2010-06-16 8:54 ` Paolo Bonzini
2010-06-16 13:02 ` Juan Quintela
2010-06-15 14:09 ` [Qemu-devel] [PATCH 0/5] Migration subsections (and ide as example) Anthony Liguori
2010-06-15 14:19 ` Juan Quintela [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=m339wo750d.fsf@trasno.mitica \
--to=quintela@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.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 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.