[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the share
From: |
Lai Jiangshan |
Subject: |
Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory |
Date: |
Wed, 10 Aug 2016 11:22:36 +0800 |
On Wed, Aug 10, 2016 at 10:22 AM, Li, Liang Z <address@hidden> wrote:
> Hi Jiangshan,
>
> Glad to see your patch. It's a simple implementation which could provide very
> useful functions.
>
>> +static void migration_bitmap_init(unsigned long *bitmap) {
>> + RAMBlock *block;
>> +
>> + bitmap_clear(bitmap, 0, last_ram_offset() >> TARGET_PAGE_BITS);
>> + rcu_read_lock();
>> + QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
>> + if (!migrate_bypass_shared_memory()
>> || !qemu_ram_is_shared(block)) {
>> + bitmap_set(bitmap, block->offset >> TARGET_PAGE_BITS,
>
> You should use (block->offset >> TARGET_PAGE_BITS )/ BITS_PER_LONG here.
Hello, Li
I might have missed something, could you tell me more?
void bitmap_set(unsigned long *map, long start, long nr);
I think the @start and @nr are both the number of the bits.
thanks,
Lai
>
>> + block->used_length >> TARGET_PAGE_BITS);
>> +
>> + /*
>> + * Count the total number of pages used by ram blocks not
>> including
>> + * any gaps due to alignment or unplugs.
>> + */
>> + migration_dirty_pages += block->used_length >>
>> TARGET_PAGE_BITS;
>> + }
>> + }
>> + rcu_read_unlock();
>> }
>
> Liang
- [Qemu-devel] [PATCH] add migration capability to bypass the shared memory, Lai Jiangshan, 2016/08/09
- Re: [Qemu-devel] [PATCH] add migration capability to bypass the shared memory, no-reply, 2016/08/09
- Re: [Qemu-devel] [PATCH] add migration capability to bypass the shared memory, Dr. David Alan Gilbert, 2016/08/09
- [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Lai Jiangshan, 2016/08/09
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Fam Zheng, 2016/08/09
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Li, Liang Z, 2016/08/09
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory,
Lai Jiangshan <=
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Li, Liang Z, 2016/08/10
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Juan Quintela, 2016/08/10
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Li, Liang Z, 2016/08/11
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Lai Jiangshan, 2016/08/11
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Lai Jiangshan, 2016/08/11
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Li, Liang Z, 2016/08/12
- Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory, Lai Jiangshan, 2016/08/12
Re: [Qemu-devel] [PATCH] add migration capability to bypass the shared memory, Lai Jiangshan, 2016/08/09
Re: [Qemu-devel] [PATCH] add migration capability to bypass the shared memory, Juan Quintela, 2016/08/10