qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [QEMU PATCH v5 4/6] migration: migrate QTAIL


From: Jianjun Duan
Subject: Re: [Qemu-ppc] [Qemu-devel] [QEMU PATCH v5 4/6] migration: migrate QTAILQ
Date: Mon, 10 Oct 2016 14:29:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 10/08/2016 12:28 PM, Halil Pasic wrote:
> 
> 
> On 10/08/2016 01:37 PM, Paolo Bonzini wrote:
>>> Even though most put/get have no issues now, when somebody writes a new
>>>> put, he or she could run into issues if only checking the type
>>>> signature. It makes the code more readable.
> 
>> No, it doesn't because one is left wondering what is VMS_LINKED about.
> 
> I agree with Paolo. IMHO VMS_LINKED is conceptually difficult in  a sense
> that it's quite different that what we have currently. I have the feeling,
> conceptually, we are trying to fit in something like data structures with a
> type parameter (the element type) here. AFAIU what vmstate currently can is
> directed acyclic graphs of certain stuff (and also completely custom
> handling based on custom put/get).
> 
You are right. What we have in VMSTATE now cannot handle a recursive (or
cyclic as you call it) structure. The idea was to use VMS_LINKED to
indicate a recursive structure. In this patch is used on a queue. It can
also be used on list or trees.
In this regard, VMS_LINKED does represent something.

Thanks,
Jianjun

>> What is the relation between linked datastructures and passing some
>> arguments as NULL/noon-NULL?
> 
> IFAIU we need those for the datastructure because it's linked and has
> a type parameter (element type). The two last arguments are for
> the element type. These were added by the previous patch because
> the old VMStateInfo did not need these. So we drastically changed
> the scope of VMStateInfo with the previous patch and I'm not
> sure I like this.
> 
> I will have to stare at this a bit longer to bring something more
> constructive than these (largely feeling-based) remarks.
> 
> Cheers,
> Halil
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]