All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Wei Liu <wei.liu2@citrix.com>, Hongyang Yang <yanghy@cn.fujitsu.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Shriram Rajagopalan <rshriram@cs.ubc.ca>
Subject: Re: [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory
Date: Tue, 14 Apr 2015 13:43:38 -0400	[thread overview]
Message-ID: <552D51CA.9040209@one.verizon.com> (raw)
In-Reply-To: <20150414095221.GR17670@zion.uk.xensource.com>

On 04/14/15 05:52, Wei Liu wrote:
> On Tue, Apr 14, 2015 at 05:40:24PM +0800, Hongyang Yang wrote:
>>
>> On 04/14/2015 05:29 PM, Wei Liu wrote:
>>> On Tue, Apr 14, 2015 at 05:22:31PM +0800, Hongyang Yang wrote:
>>> [...]
>>>>> If I understand correctly, the steps are this:
>>>>>
>>>>> * 'xl create' makes a VM of size $FOO
>>>>> * qemu bumps the size to $FOO+$N
>>>>> * 'xl save' writes $FOO+$N of page data, but the xl config file at the
>>>>> start of the image still says $FOO
>>>>> * 'xl restore' creates a vm of size $FOO, then instructs
>>>>> xc_domain_restore() to put $FOO+$N pages into it.
>>>>>
>>>>> I would argue first, that qemu should not play in this area to start with.


With the size of the ROMs unknown outside of QEMU, I do not know how to
correctly compute this in libxl.

>>>>> However, the real bug here is that the domain configuration written by
>>>>> xl save is inaccurate.

I do not 100% agree.  Since xc_domain_setmaxmem() could have been done,
this should
be part of the full domain configuration.  However right now there is no
way to include
this value in any of the domain configuration structures.

>>>> There's a case like COLO:
>>>> 1. Both Primary/Secondary VM are created first with the same config file
>>>>    which makes a VM of size $FOO
>>>> 2. qemu bumps the size to $FOO+$N

This happens very early.  I do see it reflected in PoD
(xc_domain_get_pod_target()) data.

>>>> 3. 'save' writes $FOO+$N of page data
>>>> 4. 'restore' put $FOO+$N pages into $FOO pages which will cause error
>>>>
>>>> Even if you fix the configuration, the bug still exists because the config
>>>> only been transferred from Primary to Secondary once at the very beginning
>>>> when you execute 'xl remus' command.

I am hopeful that QEMU has already done it's adjusting before you can do
this
command.  Not having used it, I do not know for sure.

>>>>  The problem is how to let the secondary
>>>> (restore) side knows the size change? Through a migration command(which is
>>>> easier in v2 migration) or some other solution?
>>> As I said in my reply to Don, the extra memory can be saved during
>>> domain creation. That would solve this problem.

The memory does get saved, the extra info is missing.

>> After migration we'll enter COLO mode, which will continously send migration
>> stream to Secondary. Domain creation only happens before doing live migration.
>>
> Because now the correct value is recorded during domain creation, it will
> always be sent to the other end, so there is no need for this kind of
> hack.

I will be looking into how to add this info (max_memkb
(xc_domain_getinfo) or
max_pages ()xc_domain_getinfolist) to the v1 migration in a compatible way
with a usage in restore.


   -Don Slutz

> Wei.
>
>>> Wei.
>>>
>>>> Form this point of view, I think Don's solution is one way to solve the
>>>> problem.
>>>>
>>>>> ~Andrew
>>>>> .
>>>>>
>>>> --
>>>> Thanks,
>>>> Yang.
>>> .
>>>
>> -- 
>> Thanks,
>> Yang.

  reply	other threads:[~2015-04-14 17:43 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 16:09 [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory Don Slutz
2015-04-13 16:20 ` Wei Liu
2015-04-13 23:51   ` Don Slutz
2015-04-13 16:25 ` Andrew Cooper
2015-04-13 23:51   ` Don Slutz
2015-04-14  8:53     ` Wei Liu
2015-04-14 17:34       ` Don Slutz
2015-04-14 17:51         ` Wei Liu
2015-04-15  9:46         ` Stefano Stabellini
2015-04-15 10:09           ` Ian Campbell
2015-04-15 11:15             ` Hongyang Yang
2015-04-15 11:27               ` Stefano Stabellini
2015-04-15 11:56                 ` Ian Campbell
2015-04-15 18:19                   ` Don Slutz
2015-04-14  8:53     ` Andrew Cooper
2015-04-14  9:22       ` Hongyang Yang
2015-04-14  9:28         ` Andrew Cooper
2015-04-14  9:42           ` Hongyang Yang
2015-04-15 14:32             ` Ian Campbell
2015-04-15 20:41               ` Don Slutz
2015-04-14  9:29         ` Wei Liu
2015-04-14  9:40           ` Hongyang Yang
2015-04-14  9:52             ` Wei Liu
2015-04-14 17:43               ` Don Slutz [this message]
2015-04-14 17:54                 ` Wei Liu
2015-04-14 22:06                   ` [PATCH v2 1/1] tools: Handle xc_maxmem adjustments Don Slutz
2015-04-15  9:53                     ` Andrew Cooper
2015-04-15  9:57                       ` Stefano Stabellini
2015-04-15 10:03                         ` Andrew Cooper
2015-04-15 10:21                           ` George Dunlap
2015-04-15 11:48                           ` Stefano Stabellini
2015-04-15 21:43                             ` Don Slutz
2015-04-15 10:16                       ` George Dunlap
2015-04-15 10:25                         ` George Dunlap
2015-04-15 10:30                           ` Andrew Cooper
2015-04-15 14:34                   ` [PATCH 1/1] xc_domain_restore: Allow QEMU to increase memory Ian Campbell
2015-04-15 16:36                     ` Wei Liu
2015-04-15 16:45                       ` Ian Campbell
2015-04-15 16:52                         ` Wei Liu
2015-04-15 18:24                           ` Don Slutz
2015-04-16  9:00                           ` Ian Campbell
2015-04-16  9:14                             ` George Dunlap
2015-04-16  9:29                               ` Ian Campbell
2015-04-14  3:46 ` Hongyang Yang
2015-04-14  8:46   ` Wei Liu
2015-04-15 14:30 ` Ian Campbell
2015-04-15 18:17   ` Don Slutz

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=552D51CA.9040209@one.verizon.com \
    --to=dslutz@verizon.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.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.