All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: wei.liu2@citrix.com, Ian.Campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	xen-devel@lists.xen.org, David Vrabel <david.vrabel@citrix.com>
Subject: Re: [PATCH] libxc: try to find last used pfn when migrating
Date: Fri, 27 Nov 2015 16:50:56 +0100	[thread overview]
Message-ID: <56587BE0.2020000@suse.com> (raw)
In-Reply-To: <22104.29977.566926.724066@mariner.uk.xensource.com>

On 27/11/15 16:22, Ian Jackson wrote:
> Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxc: try to find last used pfn when migrating"):
>> xl migrate will use much less resources for a domain with a 3.x kernel
>> started with max_mem being much larger than mem. E.g. in case you start
>> a domain on a small stand-by system and migrate it later to the large
>> production system and want to balloon it up there.
>>
>> Additionally there was a discussion this week on irc regarding this
>> topic and concern was raised this could block dom0 responsiveness.
> 
> I agree that this is a real problem but AFAICT I don't think the
> approach taken in Juergen's toolstack patch will solve it completely.
> 
> I would phrase the bug like this:
> 
>    A malicious guest kernel can cause the toolstack, when attempting
>    to migrate the domain, to use wildly excessive dom0 RAM.
> 
> I think where the administrator has configured a guest with (say) 1G
> of RAM, the memory used by the toolstack to migrate it should be
> significantly less than that 1G.
> 
> If the toolstack algorithms are such that strange behaviour by a guest
> could violate this assumption, then the toolstack should have an
> explicit check and (by default, at least) refuse to migrate such a
> guest.
> 
> I think Juergen's patch is a good workaround for existing guests which
> /accidentally/ exhibit undesirable behaviour, if we want to keep
> supporting them.

It should be considered to be a working base for being able to reject
migrating a misbehaving domain.

I guess any pv-guest which active p2m list is covering more than twice
it's max_mem can be considered to be misbehaving and migration could be
rejected.

More fine tuning would be possible by supporting a sparse p2m list, but
this would require more work. I'm not sure if it's possible to support
a sparse logdirty bitmap with current hypervisor interfaces.


Juergen

  reply	other threads:[~2015-11-27 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 14:50 [PATCH] libxc: try to find last used pfn when migrating Juergen Gross
2015-11-27 15:01 ` David Vrabel
2015-11-27 15:11   ` Juergen Gross
2015-11-27 15:18     ` Ian Campbell
2015-11-27 15:20     ` David Vrabel
2015-11-27 15:22     ` Ian Jackson
2015-11-27 15:50       ` Juergen Gross [this message]
2015-11-27 15:33 ` Wei Liu
2015-11-27 15:53   ` Juergen Gross
2015-11-27 17:16     ` Andrew Cooper
2015-11-30  8:17       ` Juergen Gross
2015-11-30  9:47         ` Andrew Cooper
2015-11-30 12:16           ` Juergen Gross
2015-11-27 16:42 ` Andrew Cooper
2015-11-27 16:51   ` Juergen Gross

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=56587BE0.2020000@suse.com \
    --to=jgross@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 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.