All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.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:07:09 +0000	[thread overview]
Message-ID: <513882ED.8040208@citrix.com> (raw)
In-Reply-To: <20130307112854.GC11217@debian70-amd64.local.net-space.pl>

On 07/03/13 11:28, Daniel Kiper wrote:
> On Wed, Mar 06, 2013 at 05:52:28PM +0000, David Vrabel wrote:
>
>> 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.

I don't think I'm understanding the use case you're talking about.

Do you mean we should allow a target <= d->tot_pages even if this is
above d->max_pages?  I agree with this.

Something like this:

void balloon_set_new_target(unsigned long target)
{
	domid_t domid = DOMID_SELF;
	int rc;
	unsigned long host_limit;

	target = min(target, MAX_DOMAIN_PAGES);

	/* Prevent target from attempting the expand the reservation
	   above the max enforced by the hypervisor. */
	rc = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
	if (rc > 0) {
		host_limit = rc;
		target = min(target,
			max(host_limit, balloon_stats.current_pages));
	}

	balloon_stats.target_pages = target;
	schedule_delayed_work(&balloon_worker, 0);
}

David

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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 21:14 [PATCH 1/1] xen/balloon: Enforce various limits on target Daniel Kiper
2013-03-05 19:27 ` Konrad Rzeszutek Wilk
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
2013-03-07 12:07         ` David Vrabel [this message]
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=513882ED.8040208@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=carsten@schiers.de \
    --cc=daniel.kiper@oracle.com \
    --cc=darren.s.shepherd@gmail.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 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.