All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "Kurt C. Hackel" <kurt.hackel@oracle.com>,
	xen-devel <xen-devel@lists.xensource.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xiaowei.hu@oracle.com
Subject: Re: [PATCH]fix hang on migration
Date: Wed, 29 Jul 2009 15:50:45 +0800	[thread overview]
Message-ID: <4A6FFF55.6090301@oracle.com> (raw)
In-Reply-To: <4A6D7AF2.20800@oracle.com>

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@oracle.com>
Reviewed-by: Xiaowei Hu <xiaowei.hu@oracle.com>

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@oracle.com>
> Reviewed-by: Xiaowei Hu <xiaowei.hu@oracle.com>
> 
> thanks,
> 
> zhigang
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2009-07-29  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 10:01 [PATCH]fix hang on migration Zhigang Wang
2009-07-29  7:50 ` Zhigang Wang [this message]
2009-07-29  7:57   ` Keir Fraser
2009-07-29  8:09     ` Zhigang Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A6FFF55.6090301@oracle.com \
    --to=zhigang.x.wang@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=kurt.hackel@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xiaowei.hu@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.