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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] xl: Update memory info in xenstore when use 'xl

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xl: Update memory info in xenstore when use 'xl mem-set'
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Sun, 09 May 2010 16:45:20 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 09 May 2010 01:45:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19428.20752.717993.453216@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <4BE3DFBE.2010901@xxxxxxxxxxxxxx> <19428.20752.717993.453216@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
Hi Ian,

Ian Jackson wrote:
> However, looking at this, it's far from clear why
> libxl_set_memory_target calls xc_domain_setmaxmem at all.  Can anyone
> explain ?

I'm trying to add subcommand 'mem-max', I think xc_domain_setmaxmem should
be used in it but not here.

I'll move this code to 'mem-max', and in 'mem-set', a check should be added
because setting memory larger than max memory is invalid.

1. Add 'mem-max'
  Add libxl_domain_setmaxmem, it calls xc_domain_setmaxmem.
  /local/domain/$domid/memory/static-max should be updated when set max memory,
it is missing now.

2. fix 'mem-set'
  Delete xc_domain_setmaxmem.
  Get max memory from /local/domain/$domid/memory/static-max, and then do value 
It seems that we cannot get max memory use libxc routines.

Do you agree with me?

Add, I found another problem about mem-set.

I used 'xl mem-set' set the memory, but the size displayed in output of 'xm 
did not change.
It seems that 'xm' get the memory size from xend, xend maintains some info of 
I'm not sure how to resolve this problem? Get info from xenstore?
What's your opinion?

# xl mem-set 3 204800
setting domid 3 memory to : 204800
# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
pvguest1                                     3   200     2        r--      0.2
# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
pvguest1                                     3   256     2     -b----      0.2

Yu Zhiguo

Xen-devel mailing list