[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ |
Date: |
Thu, 26 May 2016 18:52:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 26/05/2016 18:43, Jianjun Duan wrote:
>>> The user may only care the position of head and entry. But to
>>> implement QTAILQ_RAW_***, we need more offset information than that.
>>> If we don't query the offsets using something like offset() and store
>>> it in a metadata, we have to make the assumption that all the pointer
>>> types have the same size.
>>
>> We make this assumption elsewhere anyway. _You_ are making it by doing
>> loads and stores through void** in QTAILQ_RAW_*.
>
> I thought every data pointer can be converted to and from void type of
> pointer. Anyway we can make that assumption here.
Yes, you can do that.
> How about alignment? Is it OK to assume pointers are always aligned at
> 4byte for 32 bit and 8byte for 64 bit? If yes then we can just add the
> size of a void pointer to first to get last in QTAILQ head. We will get
> something like:
> first=0
> last = sizeof(void *)
> next=0
> prev=sizeof(void *)
Yes, that's my point. These four are constants.
Thanks,
Paolo
- [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, (continued)
- [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Jianjun Duan, 2016/05/24
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, David Gibson, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Paolo Bonzini, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Jianjun Duan, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Paolo Bonzini, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Jianjun Duan, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Paolo Bonzini, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Jianjun Duan, 2016/05/25
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Paolo Bonzini, 2016/05/26
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ, Jianjun Duan, 2016/05/26
- Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ,
Paolo Bonzini <=