WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Mysql inside Xen crashes during live migration.

To: Vatche Isahakian <vatchei@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Mysql inside Xen crashes during live migration.
From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Date: Mon, 7 Dec 2009 13:12:57 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Sun, 06 Dec 2009 21:13:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <701765e30912031407t10fd934cg3d8e651c1cad58a@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <701765e30912031407t10fd934cg3d8e651c1cad58a@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acp1AmU7bIb6JIHFQ02eGfpsHk6dJgB+EpCg
Thread-topic: [Xen-devel] Mysql inside Xen crashes during live migration.
 Don't know whether your system has included the fix from Edwin Zhai. Without 
this fix, it may crash the guest system during migration if guest is doing 
disk-intensive workloads.  Hope it can fix your issue! 
Xiantao

________________________________

From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Vatche Isahakian
Sent: Friday, December 04, 2009 6:07 AM
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Mysql inside Xen crashes during live migration.


Hi All 

I have a problem about Xen live migration, and was wondering whether anyone 
faced the same problem.
I have a VM running on Xen (3.3) which consists of a web server (apache) and 
mysql database. When I try to do live migration, the system crashes. 
I separated the database from the web Server, and allocated each a VM by 
itself. Now when I migrate the Webserver, everything runs smoothly, but when I 
migrate the mysql, the VM crashes.

Did anyone experience this type of problem with mysql and xen?
--- Begin Message ---
To: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] [IOEMU]: fix the crash of HVM live migration with intensive disk access
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Tue, 11 Aug 2009 20:12:51 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: "xen-devel-bounces@xxxxxxxxxxxxxxxxxxx" <xen-devel-bounces@xxxxxxxxxxxxxxxxxxx>
Thread-index: AcoafY7hlDkKTaruT+qB8jWgiDknkw==
Thread-topic: [Xen-devel] [PATCH] [IOEMU]: fix the crash of HVM live migration with intensive disk access
User-agent: Mutt/1.5.16 (2007-06-09)
 [IOEMU]: fix the crash of HVM live migration with intensive disk access

Intensive disk access, e.g. sum of big file, during HVM live migration would 
cause guest error even file system crash. Guest dmesg said
"attempt to access beyond end of device
hda1: rw=0, want=10232032112, limit=10474317"

Current map cache used by qemu dma doesn't mark the page dirty, so that these 
pages(probably holding DMA data struct) are not transferred in the last 
iteration during live migration.

This patch fixes it, and also merges the qemu's original dirty bitmap used by 
other devices such as vga.

Signed-Off-By: Zhai Edwin <edwin.zhai@xxxxxxxxx>


Index: hv/tools/ioemu-remote/cpu-all.h
===================================================================
--- hv.orig/tools/ioemu-remote/cpu-all.h
+++ hv/tools/ioemu-remote/cpu-all.h
@@ -975,6 +975,16 @@ static inline int cpu_physical_memory_ge
 static inline void cpu_physical_memory_set_dirty(ram_addr_t addr)
 {
     phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff;
+
+#ifndef CONFIG_STUBDOM
+    if (logdirty_bitmap != NULL) {
+        addr >>= TARGET_PAGE_BITS;
+        if (addr / 8 < logdirty_bitmap_size) {
+            logdirty_bitmap[addr / HOST_LONG_BITS]
+                |= 1UL << addr % HOST_LONG_BITS;
+        }
+    }
+#endif
 }
 
 void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
Index: hv/tools/ioemu-remote/i386-dm/exec-dm.c
===================================================================
--- hv.orig/tools/ioemu-remote/i386-dm/exec-dm.c
+++ hv/tools/ioemu-remote/i386-dm/exec-dm.c
@@ -806,6 +806,24 @@ void *cpu_physical_memory_map(target_phy
     if ((*plen) > l)
         *plen = l;
 #endif
+#ifndef CONFIG_STUBDOM
+    if (logdirty_bitmap != NULL) {
+        /* Record that we have dirtied this frame */
+        unsigned long pfn = addr >> TARGET_PAGE_BITS;
+        do {
+            if (pfn / 8 >= logdirty_bitmap_size) {
+                fprintf(logfile, "dirtying pfn %lx >= bitmap "
+                        "size %lx\n", pfn, logdirty_bitmap_size * 8);
+            } else {
+                logdirty_bitmap[pfn / HOST_LONG_BITS]
+                    |= 1UL << pfn % HOST_LONG_BITS;
+            }
+
+            pfn++;
+        } while ( (pfn << TARGET_PAGE_BITS) < addr + *plen );
+
+    }
+#endif
     return qemu_map_cache(addr, 1);
 }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

--- End Message ---
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>