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] [PATCH]fix hang on migration

To: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]fix hang on migration
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 29 Jul 2009 08:57:48 +0100
Cc: "Kurt C. Hackel" <kurt.hackel@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, "xiaowei.hu@xxxxxxxxxx" <xiaowei.hu@xxxxxxxxxx>
Delivery-date: Wed, 29 Jul 2009 00:58:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A6FFF55.6090301@xxxxxxxxxx>
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
Thread-index: AcoQIU8gFOOV5UqgRZulyZZPODWP7gAAPRQC
Thread-topic: [Xen-devel] [PATCH]fix hang on migration
User-agent: Microsoft-Entourage/12.20.0.090605
Patch not attached.


On 29/07/2009 08:50, "Zhigang Wang" <zhigang.x.wang@xxxxxxxxxx> wrote:

> Hi Keir,
> 
> The hang happens often when you runs many VM simultaneously. So I'd like
> this patch go to 3.4-testing as well.
> 
> This is the regenerated patch against xen-3.4-testing.
> 
> Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
> Reviewed-by: Xiaowei Hu <xiaowei.hu@xxxxxxxxxx>
> 
> thanks,
> 
> zhigang
> 
> Zhigang Wang wrote:
>> hi,
>> 
>> the migration process may be hang when you start another VM while the
>> migration is under way.
>> 
>> Eg.
>> 
>> Start a VM:
>> 
>> # xm create OVM_EL5U3_X86_PVHVM_4GB/vm.cfg
>> 
>> Wait for the VM bootup, then start another VM while this VM is migration:
>> 
>> # xm migrate -l OVM_EL5U3_X86_PVHVM_4GB localhost &
>> # xm create OVM_EL5U1_X86_HVM_4GB/vm.cfg
>> 
>> The migration will hang on:
>> 
>> # xm list
>> Name                                        ID   Mem VCPUs      State
>> Time(s)
>> Domain-0                                     0   543     2     r-----
>> 110.1
>> OVM_EL5U1_X86_HVM_4GB                        4   256     1     -b----
>> 39.6
>> OVM_EL5U3_X86_PVHVM_4GB                      5   512     1     --p---
>> 0.0
>> 
>> The migration will only finish after shutting down VM OVM_EL5U1_X86_HVM_4GB.
>> 
>> This is because we are using a threaded model in xend, and the migration
>> thread is running
>> in the same context, and we are using pipes/sockets in migration.
>> 
>> So the write side of the pipe/socket created while migration will inherited
>> to children, thus
>> the reading side of the pipe/socket will hang if there is a child forked and
>> the child never end up
>> (like qemu-dm).
>> 
>> So we should close all inherited open file descriptors in every forked
>> process.
>> 
>> Ian: please review the patch against qemu-dm forking.
>> 
>> Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
>> Reviewed-by: Xiaowei Hu <xiaowei.hu@xxxxxxxxxx>
>> 
>> thanks,
>> 
>> zhigang
>> 
>> 
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
> 



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

<Prev in Thread] Current Thread [Next in Thread>