xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: Xen ballooning interface
Date: Mon, 13 Aug 2018 17:44:51 +0200	[thread overview]
Message-ID: <f4e4b77c-0e9f-36d1-9394-720fbb9d2435@suse.com> (raw)
In-Reply-To: <5B71A3EA02000078001DD953@prv1-mh.provo.novell.com>

On 13/08/18 17:29, Jan Beulich wrote:
>>>> On 13.08.18 at 16:20, <jgross@suse.com> wrote:
>> On 13/08/18 15:54, Jan Beulich wrote:
>>>>>> On 13.08.18 at 15:06, <jgross@suse.com> wrote:
>>>> Suggested new interface
>>>> -----------------------
>>>> Hypercalls, memory map(s) and ACPI tables should stay the same (for
>>>> compatibility reasons or because they are architectural interfaces).
>>>>
>>>> As the main confusion in the current interface is related to the
>>>> specification of the target memory size this part of the interface
>>>> should be changed: specifying the size of the ballooned area instead
>>>> is much clearer and will be the same for all guest types (no firmware
>>>> memory or magic additions involved).
>>>
>>> But isn't this backwards? The balloon size is a piece of information
>>> internal to the guest. Why should the outside world know or care?
>>
>> Instead of specifying an absolute value to reach you'd specify how much
>> memory the guest should stay below its maximum. I think this is a valid
>> approach.
> 
> But with you vNUMA model there's no single such value, and nothing
> like a "maximum" (which would need to be per virtual node afaics).

With vNUMA there is a current value of memory per node supplied by the
tools and a maximum per node can be caclulated the same way. This
results in a balloon size per node.

There is still the option to let the guest adjust the per node balloon
sizes after reaching the final memory size or maybe during the process
of ballooning at a certain rate.

> 
>>>> Any further thoughts on this?
>>>
>>> The other problem we've always had was that address information
>>> could not be conveyed to the driver. The worst example in the past
>>> was that 32-bit PV domains can't run on arbitrarily high underlying
>>> physical addresses, but of course there are other cases where
>>> memory below a certain boundary may be needed. The obvious
>>> problem with directly exposing address information through the
>>> interface is that for HVM guests machine addresses are meaningless.
>>> Hence I wonder whether a dedicated "balloon out this page if you
>>> can" mechanism would be something to consider.
>>
>> Isn't this a problem orthogonal to the one we are discussing here?
> 
> Yes, but I think we shouldn't design a new interface without
> considering all current shortcomings.

I don't think the suggested interface would make it harder to add a way
to request special pages to be preferred in the ballooning process.

> 
>> I'd rather do a localhost guest migration to free specific pages a
>> guest is owning and tell the Xen memory allocator not to hand them
>> out to the new guest created by the migration.
> 
> There may not be enough memory to do a localhost migration.
> Ballooning, after all, may be done just because of a memory
> shortage.

True.

Still I believe adding the tooling to identify domains owning needed
memory pages and demand them to balloon those out in order to make use
of those pages for creation of a special domain is nothing which is
going to happen soon.

So as long as we are confident that the new interface wouldn't block
such a usage I think we are fine.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-08-13 15:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 13:06 Xen ballooning interface Juergen Gross
2018-08-13 13:54 ` Jan Beulich
2018-08-13 14:12 ` Roger Pau Monné
2018-08-13 14:27   ` Juergen Gross
2018-08-13 14:59     ` Roger Pau Monné
     [not found] ` <5B718DB202000078001DD8A9@suse.com>
2018-08-13 14:20   ` Juergen Gross
2018-08-13 15:29     ` Jan Beulich
2018-08-13 15:44       ` Juergen Gross [this message]
2018-08-14  7:02         ` Jan Beulich
2018-08-14  7:19           ` Juergen Gross
2018-08-14  7:34             ` Jan Beulich
     [not found]   ` <9509907f?= =?UTF-8?B?77+9M2YzZe+/vTVkMWbvv70yZmI077+9OTkxZjBiNGFhODM0QHN1c2UuY29tPiA8?= =?UTF-8?Q?5B71A3EA02000078001DD953@prv1=ef=bf=bdmh.provo.novell.com>
     [not found]     ` <f4e4b?= =?UTF-8?B?Nzdj77+9MGU5Zu+/vTM2ZDHvv705Mzk077+9NzIwZmJiOWQyNDM1QHN1c2UuY29t?= =?UTF-8?Q?>
     [not found]       ` <5B727E7302000078001DDACB@prv1=ef=bf=bdmh.provo.novell.com>
     [not found]         ` <60?= =?UTF-8?Q?ff0fc0-04db-b9e8-077c-2037114f4b77@suse.com>
     [not found]           ` <5B72860202000078001?= =?UTF-8?Q?DDAFF@suse.com>
2018-08-14  7:47             ` Juergen Gross
2018-08-21  9:58 ` Wei Liu
2018-08-21 10:07   ` Roger Pau Monné

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=f4e4b77c-0e9f-36d1-9394-720fbb9d2435@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).