qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] migrate: auto increase the strength to throttle vcp


From: arei.gonglei
Subject: [Qemu-devel] [PATCH] migrate: auto increase the strength to throttle vcpu
Date: Tue, 29 Jul 2014 10:05:47 +0800

From: ChenLiang <address@hidden>

Previously, the strength to throttle vcpu is constant that is too
arbitrarily. This patch(suggested by Juan) increases the strength
according to the times of memory iterator.

Signed-off-by: ChenLiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
 arch_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch_init.c b/arch_init.c
index 8ddaf35..02436e3 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -1372,8 +1372,10 @@ TargetInfo *qmp_query_target(Error **errp)
    VM to run inside qemu via async_run_on_cpu()*/
 static void mig_sleep_cpu(void *opq)
 {
+    uint64_t sleep_ms = bitmap_sync_count < 30 ? bitmap_sync_count : 30;
+
     qemu_mutex_unlock_iothread();
-    g_usleep(30*1000);
+    g_usleep(sleep_ms*1000);
     qemu_mutex_lock_iothread();
 }
 
-- 
1.7.12.4





reply via email to

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