qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jianjun Duan <duanj@linux.vnet.ibm.com>,
	Sascha Silbe <silbe@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, veroniabahaa@gmail.com,
	peter.maydell@linaro.org, quintela@redhat.com, mst@redhat.com,
	mark.cave-ayland@ilande.co.uk, mdroth@linux.vnet.ibm.com,
	mreitz@redhat.com, blauwirbel@gmail.com, dmitry@daynix.com,
	qemu-ppc@nongnu.org, kraxel@redhat.com, amit.shah@redhat.com,
	kwolf@redhat.com, david@gibson.dropbear.id.au,
	leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net
Subject: Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ
Date: Tue, 7 Jun 2016 17:34:57 +0100	[thread overview]
Message-ID: <20160607163457.GA22900@work-vm> (raw)
In-Reply-To: <25630722-124a-f11f-9298-9653b3553558@redhat.com>

* Paolo Bonzini (pbonzini@redhat.com) wrote:
> 
> 
> On 07/06/2016 16:43, Dr. David Alan Gilbert wrote:
> >   b) I think you should really try and split it into two parts:
> >     1) A VMSTATE_ARRAY_CUSTOM (?) - so it's an array of elements but we've got a special
> >        way of allocating/counting/reading the elements
> >     2) A version of that which is for a QTAILQ.
> >        It's important that whatever ends up on the migration stream doesn't reflect
> >        that it happens to be implemented as a QTAILQ; so if you decide to change
> >        it later the migration compatibility doesn't break.
> 
> (Just to clarify before Jianjun wakes up) a VMSTATE_ARRAY is just a
> sequence of elements.  The count, if needed as in a VARRAY, is stored
> earlier and separately.  Currently lists (including this QTAILQ) are
> usually represented in the migration stream as a sequence of elements
> preceded by "1" and terminated by a "0".  Would you like to change it to
> a count + sequence as well?
> 
> This would prevent using the new QTAILQ support for other existing lists
> such as virtio-blk and scsi's request lists.

That depends if it's something you're trying to keep migration compatibility
with;  if you're trying to keep format compaibility then sure keep it as is.
If you're not trying to keep compatibility, then why can't virtio-blk or
scsi request lists also use a count rather than the markers?

> >   c) Use new trace_ names for get_qtailq rather than misusing trace_vmstate_load_state*
> >   d) Add a trace_ for put_qtailq as well - that way when it goes horribly wrong we can
> >      turn the tracing on on both sides :-)
> >   e) Is there anyway to make QTAILQ_RAW_INSERT_TAIL any more readable?
> >      I don't think I understand why you can't use the standard QTAILQ macros.
> 
> Because they assume a particular type. The "raw" version need to work on
> void*.

Ah OK.

Dave

> 
> Thanks,
> 
> Paolo
> 
> >   f) You might need to fix up Amit's scripts/vmstate-static-checker.py
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  parent reply	other threads:[~2016-06-07 16:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 18:02 [Qemu-devel] [QEMU RFC PATCH v3 0/6]Migration: ensure hotplug and migration work together Jianjun Duan
2016-05-31 18:02 ` [Qemu-devel] [QEMU RFC PATCH v3 1/6] Migration: Defined VMStateDescription struct for spapr_drc Jianjun Duan
2016-06-02  4:07   ` David Gibson
2016-06-03  0:28     ` Jianjun Duan
2016-06-03  1:48       ` David Gibson
2016-05-31 18:02 ` [Qemu-devel] [QEMU RFC PATCH v3 2/6] vmstate: Define VARRAY with VMS_ALLOC Jianjun Duan
2016-05-31 18:02 ` [Qemu-devel] [QEMU RFC PATCH v3 3/6] Migration: extend VMStateInfo Jianjun Duan
2016-05-31 18:02 ` [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ Jianjun Duan
2016-05-31 19:54   ` Paolo Bonzini
2016-05-31 21:53     ` Jianjun Duan
2016-06-01 15:29       ` Paolo Bonzini
2016-06-01 17:06         ` Jianjun Duan
2016-06-01 18:32           ` Paolo Bonzini
2016-06-02  3:58   ` David Gibson
2016-06-02 15:01   ` Sascha Silbe
2016-06-02 16:11     ` Jianjun Duan
2016-06-07 14:43       ` Dr. David Alan Gilbert
2016-06-07 16:31         ` Paolo Bonzini
2016-06-07 16:33           ` Michael S. Tsirkin
2016-06-07 16:34           ` Dr. David Alan Gilbert [this message]
2016-06-07 16:35             ` Paolo Bonzini
2016-06-07 16:46               ` Dr. David Alan Gilbert
2016-06-07 16:43         ` [Qemu-devel] [Qemu-ppc] " Jianjun Duan
2016-06-03 17:12     ` [Qemu-devel] " Jianjun Duan
2016-06-06 13:47     ` Paolo Bonzini
2016-05-31 18:02 ` [Qemu-devel] [QEMU RFC PATCH v3 5/6] Migration: migrate ccs_list in spapr state Jianjun Duan
2016-05-31 18:02 ` [Qemu-devel] [QEMU RFC PATCH v3 6/6] Migration: migrate pending_events of " Jianjun Duan

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=20160607163457.GA22900@work-vm \
    --to=dgilbert@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --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=silbe@linux.vnet.ibm.com \
    --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).