From: <peng.hao2@zte.com.cn>
To: imammedo@redhat.com
Cc: mst@redhat.com, wang.yechao255@zte.com.cn, qemu-devel@nongnu.org
Subject: [Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvhost region merge
Date: Wed, 19 Jul 2017 16:12:55 +0800 (CST) [thread overview]
Message-ID: <201707191612551425978@zte.com.cn> (raw)
发件人: <imammedo@redhat.com>
收件人:彭浩10096742
抄送人: <mst@redhat.com>王业超10154425 <qemu-devel@nongnu.org>
日 期 :2017年07月19日 15:51
主 题 :Re: [Qemu-devel] [PATCH] vhost: fix a migration failed because ofvhost region merge
On Wed, 19 Jul 2017 23:17:32 +0800
Peng Hao <peng.hao2@zte.com.cn> wrote:
> When a guest that has several hotplugged dimms is migrated, in
> destination host it will fail to resume. Because vhost regions of
> several dimms in source host are merged and in the restore stage
> in destination host it computes whether more than vhost slot limit
> before merging vhost regions of several dimms.
could you provide a bit more detailed description of the problem
including command line+used device_add commands on source and
command line on destination?
-------I just migrate guest vm. The guest has vhost-user net. Vhost-user has a limit of slots
(VHOST_MEMORY_MAX_NREGIONS=8),hotplug memory (dimm) can increase vhost used slots
,but vhost can merge region to decrease vhost used slots.
Before migration guset has hotplugged several dimms one by one (more than vhost slot limit,
but after merging it less than vhost slot limit). In migrating to destination host ,qemu begins to
execute restore guest and it realize foreach dimms device at a time and
compute whether vhost used slots more than vhost slot limit before merging.
So report "a used vhost backend has no free memory slots left".
I just make a distinction using a vm state.
>
> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
> Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
> ---
> hw/mem/pc-dimm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
> index ea67b46..bb0fa08 100644
> --- a/hw/mem/pc-dimm.c
> +++ b/hw/mem/pc-dimm.c
> @@ -101,7 +101,7 @@ void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms,
> goto out
> }
>
> - if (!vhost_has_free_slot()) {
> + if (!vhost_has_free_slot() && runstate_is_running()) {
> error_setg(&local_err, "a used vhost backend has no free"
> " memory slots left")
> goto out
next reply other threads:[~2017-07-19 8:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 8:12 peng.hao2 [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-07-20 2:57 [Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvhost region merge peng.hao2
2017-07-21 23:50 ` Michael S. Tsirkin
2017-07-21 1:00 peng.hao2
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=201707191612551425978@zte.com.cn \
--to=peng.hao2@zte.com.cn \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wang.yechao255@zte.com.cn \
/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.