WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Disallow setting maxmem to higher value than tot

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Disallow setting maxmem to higher value than total physical memory size
From: Michal Novotny <minovotn@xxxxxxxxxx>
Date: Wed, 01 Sep 2010 17:34:10 +0200
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 01 Sep 2010 08:33:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1283354425.12544.9514.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C7E47B2.9010805@xxxxxxxxxx> <1283345049.12544.9494.camel@xxxxxxxxxxxxxxxxxxxxxx> <4C7E4EAD.3060106@xxxxxxxxxx> <1283348230.12544.9506.camel@xxxxxxxxxxxxxxxxxxxxxx> <4C7E60D0.8050706@xxxxxxxxxx> <1283354425.12544.9514.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4
On 09/01/2010 05:20 PM, Ian Campbell wrote:
On Wed, 2010-09-01 at 15:18 +0100, Michal Novotny wrote:

Oh, ok. It's not limited to dom0 nevertheless I don't see anything to be
causing anything bad in domU. Of course, I can limit this to dom0 but
for domU you can be having e.g. this:
1)
dom0: total memory = 8192
domU: memory = 4096, maxmem = 8192 (xm mem-max domU 16384 fails)
It is useful, legal and valid to set e.g. maxmem = 12288 here, leaving
memory = 4096. Your patch prevents that.


That's right. I'm just saying that there's a possibility that there will be wrong data output from `xm list -l` command.

2)
and when you migrate to host B:
dom0: total memory = 16384
domU: memory = 4096, maxmem = 8192
If maxmem = 12288 then it would be possible to balloon this guest up to
12288 on this system. With your patch it is no longer possible. Note
that maxmem cannot change once the domU is booted so it needs to have
been = 12288 at the time the guest was created on Host A.


That's correct.

Or should I just ignore the possibility domU maxmem could be set to
higher value than host machine could provide and should I limit my check
to dom0 only?
Yes!

I haven't considered the applicability of this patch to dom0
particularly deeply but it is wrong to enforce this constraint on domUs.

Ian.

Ok, I'm attaching the patch now for review. Now it's working fine for dom0 to limit just dom0.

What do you think about this?

Michal

--
Michal Novotny<minovotn@xxxxxxxxxx>, RHCE
Virtualization Team (xen userspace), Red Hat

Attachment: xen-disallow-setting-max-mem-higher-than-total-phys-mem.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>