From: Halil Pasic <pasic@linux.vnet.ibm.com>
To: Jianjun Duan <duanj@linux.vnet.ibm.com>, quintela@redhat.com
Cc: veroniabahaa@gmail.com, peter.maydell@linaro.org,
dgilbert@redhat.com, mdroth@linux.vnet.ibm.com, mst@redhat.com,
mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org,
mreitz@redhat.com, blauwirbel@gmail.com, amit.shah@redhat.com,
qemu-ppc@nongnu.org, kraxel@redhat.com, kwolf@redhat.com,
dmitry@daynix.com, pbonzini@redhat.com, rth@twiddle.net,
leon.alrae@imgtec.com, aurelien@aurel32.net,
david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [QEMU PATCH v10 3/3] tests/migration: Add test for QTAILQ migration
Date: Thu, 3 Nov 2016 18:17:42 +0100 [thread overview]
Message-ID: <38ec5832-3566-3cee-a12a-5dbcdfb13ea3@linux.vnet.ibm.com> (raw)
In-Reply-To: <1c541e96-55c6-cd43-f598-afd5f0ecae9e@linux.vnet.ibm.com>
On 11/03/2016 05:47 PM, Jianjun Duan wrote:
>
> On 11/03/2016 05:22 AM, Halil Pasic wrote:
>> >
>> >
>> > On 11/02/2016 11:47 AM, Juan Quintela wrote:
>>> >> Jianjun Duan <duanj@linux.vnet.ibm.com> wrote:
>>>> >>> Add a test for QTAILQ migration to tests/test-vmstate.c.
>>>> >>>
>>>> >>> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com>
>>> >>
>>> >> Reviewed-by: Juan Quintela <quintela@redhat.com>
>>> >>
>> >
>> > Empty QTAILQ seems to be broken. Have written a small
>> > test to prove my point. It May even make sense to have such
>> > a test in the test-suite (some prettyfication might be
>> > necessary though).
>> >
> It is working as intended.
>
My train of thought was that the object holding the queue might
be dynamically allocated by the migration code or otherwise
uninitialized. I was unaware these scenarios are prohibited.
> The current design is to append the qtailq from source to the
> corresponding one on target.
I do not see this documented. I'm used to vmstate_load overwriting
values and following pointers, so IMHO it is not obvious that
qtailq load does append.
> It works well for the task in hard
> such as migrating ccs_list and pending_events for DRC objects.
>
Because target head is always properly initialized to empty queue?
> I suspect in most cases the qtailqs on target are empty.
If I think about migration having no queues populated with
elements on a target site sounds very reasonable since IFAIU
the target should not do any work which would populate these
data structures.
> If not,
> appending to them is a good choice. Clearing them is tricky since
> each queue probably require a specialized routine to clean. If they
> are not empty there are must be good reasons for that.
Have you some code or a scenario in mind where this is legit? I
mean creating a mix of the state(?) we found at the target and
the state captured at the source does not sound right. I would
argue that the target should not have any state which is subject
to migration.
You are right a non-empty queue is trouble, and frankly I never
considered it as a valid scenario.
Sorry if I'm bothering you with nonsense.
Greetings,
Halil
>
> Thanks,
> Jianjun
>
next prev parent reply other threads:[~2016-11-03 17:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 19:53 [Qemu-devel] [QEMU PATCH v10 0/3] migration: migrate QTAILQ Jianjun Duan
2016-10-31 19:53 ` [Qemu-devel] [QEMU PATCH v10 1/3] migration: extend VMStateInfo Jianjun Duan
2016-11-02 10:40 ` Juan Quintela
2016-11-02 16:54 ` Jianjun Duan
2016-11-03 10:18 ` Juan Quintela
2016-10-31 19:53 ` [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ Jianjun Duan
2016-11-02 10:45 ` Juan Quintela
2016-11-02 16:38 ` Paolo Bonzini
2016-11-03 11:14 ` Halil Pasic
2016-11-03 11:32 ` Halil Pasic
2016-11-02 17:05 ` Jianjun Duan
2016-10-31 19:53 ` [Qemu-devel] [QEMU PATCH v10 3/3] tests/migration: Add test for QTAILQ migration Jianjun Duan
2016-11-02 10:47 ` Juan Quintela
2016-11-03 12:22 ` Halil Pasic
2016-11-03 16:47 ` Jianjun Duan
2016-11-03 17:17 ` Halil Pasic [this message]
2016-11-03 18:40 ` Jianjun Duan
2016-11-03 18:51 ` Halil Pasic
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=38ec5832-3566-3cee-a12a-5dbcdfb13ea3@linux.vnet.ibm.com \
--to=pasic@linux.vnet.ibm.com \
--cc=amit.shah@redhat.com \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=dmitry@daynix.com \
--cc=duanj@linux.vnet.ibm.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=leon.alrae@imgtec.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=veroniabahaa@gmail.com \
/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).