mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Kiper <daniel.kiper@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: "carsten@schiers.de" <carsten@schiers.de>,
	"darren.s.shepherd@gmail.com" <darren.s.shepherd@gmail.com>,
	"james-xen@dingwall.me.uk" <james-xen@dingwall.me.uk>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 1/1] xen/balloon: Enforce various limits on target
Date: Thu, 7 Mar 2013 12:28:54 +0100	[thread overview]
Message-ID: <20130307112854.GC11217@debian70-amd64.local.net-space.pl> (raw)
In-Reply-To: <5137825C.4030805@citrix.com>

On Wed, Mar 06, 2013 at 05:52:28PM +0000, David Vrabel wrote:
> On 06/03/13 16:47, Daniel Kiper wrote:

[...]

> >> I think reserve_additional_memory() should check the current resource
> >> map and the e820 map to find a large enough unused region.  This can be
> >> done as an additional patch at a later date.
> >>
> >>> It does not allow balloon driver to execute infinite
> >>> loops when target exceeds limits in other cases too.
> >>
> >> This sentence confuses me.
>
> I'm just confused by the English.  Perhaps it should say:
>
> "The balloon driver will limit target to the maximum reservation as any
> attempt to populate pages above the maximum reservation will always fail."
>
> ?

That is OK.

[...]

> >>> +	if (xen_initial_domain()) {
> >>> +		rc = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
> >>> +
> >>> +		/* Limit is not enforced by hypervisor. */
> >>> +		if (rc == -EPERM)
> >>> +			goto no_host_limit;
> >>> +
> >>> +		if (rc <= 0) {
> >>> +			pr_info("xen_balloon: %s: Initial domain target limit "
> >>> +				"could not be established: %i\n", __func__, rc);
> >>> +			goto no_host_limit;
> >>> +		}
> >>> +
> >>> +		host_limit = rc;
> >>
> >> I think you should use this method for both dom0 and domUs.  No need to
> >> check static-max from xenstore.
> >
> > Sadly XENMEM_maximum_reservation for domU returns value which is set by xl mem-set
> > not by xl mem-max :-(((... That is why I get this value from xenstore.
>
> It gets d->max_pages which the limit for d->tot_pages. d->max_pages is
> set by xl mem-max (and xl mem-set as it uses the enforce option to

No, it was tested by me and d->max_pages is set by xl mem-set (it is
current target). d->tot_pages has count of pages for a given moment.
It is confusing for me but this is the reality.

> libxl_set_memory_target()).
>
> If you set the target above d->max_pages you won't be able to populate them.
>
> So, using the maximum_reservation call seems like the right thing to me.

Please look above. If you use this value you would not
be able to increase reservation.

Daniel

  reply	other threads:[~2013-03-07 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 21:14 Daniel Kiper
2013-03-05 19:27 ` Konrad Rzeszutek Wilk
2013-03-06 11:05 ` David Vrabel
2013-03-06 16:47   ` Daniel Kiper
2013-03-06 17:52     ` David Vrabel
2013-03-07 11:28       ` Daniel Kiper [this message]
2013-03-07 12:07         ` David Vrabel
2013-03-07 14:25           ` Daniel Kiper

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=20130307112854.GC11217@debian70-amd64.local.net-space.pl \
    --to=daniel.kiper@oracle.com \
    --cc=carsten@schiers.de \
    --cc=darren.s.shepherd@gmail.com \
    --cc=david.vrabel@citrix.com \
    --cc=james-xen@dingwall.me.uk \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®