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

Re: [Xen-devel] [PATCH]fix hang on migration



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.