[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/12] ram: save_live_complete() only do one loop
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 10/12] ram: save_live_complete() only do one loop |
Date: |
Thu, 28 Jun 2012 21:22:08 +0200 |
We were doing the same loop that stage2, and a new one for stage3. We
only need the one for stage3.
Signed-off-by: Juan Quintela <address@hidden>
---
arch_init.c | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 1eab331..fe843a7 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -402,41 +402,10 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
static int ram_save_complete(QEMUFile *f, void *opaque)
{
- double bwidth = 0;
- int ret;
- int i;
int bytes_sent;
memory_global_sync_dirty_bitmap(get_system_memory());
- bwidth = qemu_get_clock_ns(rt_clock);
-
- i = 0;
- while ((ret = qemu_file_rate_limit(f)) == 0) {
- bytes_sent = ram_save_block(f);
- bytes_transferred += bytes_sent;
- if (bytes_sent == 0) { /* no more blocks */
- break;
- }
- /* we want to check in the 1st loop, just in case it was the 1st time
- and we had to sync the dirty bitmap.
- qemu_get_clock_ns() is a bit expensive, so we only check each some
- iterations
- */
- if ((i & 63) == 0) {
- uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000;
- if (t1 > MAX_WAIT) {
- DPRINTF("big wait: %ld milliseconds, %d iterations\n", t1, i);
- break;
- }
- }
- i++;
- }
-
- if (ret < 0) {
- return ret;
- }
-
/* try transferring iterative blocks of memory */
/* flush all remaining blocks regardless of rate limiting */
--
1.7.10.2
- Re: [Qemu-devel] [PATCH 02/12] savevm: Live migration handlers register the struct directly, (continued)
- [Qemu-devel] [PATCH 03/12] savevm: remove SaveSetParamsHandler, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 04/12] savevm: remove SaveLiveStateHandler, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 05/12] savevm: Refactor cancel operation in its own operation, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 06/12] savevm: introduce is_active method, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 09/12] ram: save_live_setup() don't need to sent pages, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 08/12] savevm: split save_live into stage2 and stage3, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 10/12] ram: save_live_complete() only do one loop,
Juan Quintela <=
- [Qemu-devel] [PATCH 11/12] ram: iterate phase, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 07/12] savevm: split save_live_setup from save_live_state, Juan Quintela, 2012/06/28
- [Qemu-devel] [PATCH 12/12] ram: save_live_setup() we don't need to synchronize the dirty bitmap., Juan Quintela, 2012/06/28