[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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 
check.
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 
list'
did not change.
It seems that 'xm' get the memory size from xend, xend maintains some info of 
VM.
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



Regards
Yu Zhiguo



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.