[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/12] ram: iterate phase
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 11/12] ram: iterate phase |
Date: |
Tue, 03 Jul 2012 12:48:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux) |
Igor Mitsyanko <address@hidden> wrote:
> On 6/28/2012 11:22 PM, Juan Quintela wrote:
>> We only need to synchronize the bitmap when the number of dirty pages is low.
>> Not every time that we call the function.
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>> arch_init.c | 9 ++++++---
>> 1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch_init.c b/arch_init.c
>> index fe843a7..8299c15 100644
>> --- a/arch_init.c
>> +++ b/arch_init.c
>> @@ -348,8 +348,6 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
>> int i;
>> uint64_t expected_time;
>>
>> - memory_global_sync_dirty_bitmap(get_system_memory());
>> -
>> bytes_transferred_last = bytes_transferred;
>> bwidth = qemu_get_clock_ns(rt_clock);
>>
>> @@ -397,7 +395,12 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
>> DPRINTF("ram_save_live: expected(%ld) <= max(%ld)?\n", expected_time,
>> migrate_max_downtime());
>>
>> - return expected_time <= migrate_max_downtime();
>> + if (expected_time <= migrate_max_downtime()) {
>> + memory_global_sync_dirty_bitmap(get_system_memory());
>> +
>> + return expected_time <= migrate_max_downtime();
>
> Shouldn't expected_time be recalculated after
> memory_global_sync_dirty_bitmap()?
It "depends" only of the network speed,
memory_global_sync_dirty_bitmap() should be really fast (notice that
with lots of memory this couldn't be true).
Later, Juan.