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

RE: [Xen-devel] [PATCH] Fix auto-ballooning of dom0 for HVMdomains


  • To: "Charles Coffing" <ccoffing@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
  • Date: Sat, 20 May 2006 22:14:41 +0800
  • Delivery-date: Sat, 20 May 2006 07:15:12 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcZ7ftS3p9Btbq/7SIe5bTltzCGYNQAmBWXQ
  • Thread-topic: [Xen-devel] [PATCH] Fix auto-ballooning of dom0 for HVMdomains

 

>-----Original Message-----
>From: Charles Coffing [mailto:ccoffing@xxxxxxxxxx] 
>Sent: Saturday, May 20, 2006 3:59 AM
>To: Jiang, Yunhong; xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: RE: [Xen-devel] [PATCH] Fix auto-ballooning of dom0 
>for HVMdomains
>
>> On Thu, May 18, 2006 at 10:23 PM, in message
><A8F9FF3706D1A5479EF62192B976DB441C0594@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
>"Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote: 
>> Hi, Charles
>>      Just one suggestion, for  xen- hvm- auto- balloon.diff, how
>about
>> change 
>>              xc.domain_setmaxmem(self.domid, m)
>>  
>> to 
>>              xc.domain_setmaxmem(self.domid, self.info['memory'] *
>1024)
>
>Ideally, yes, I would agree.  But later, in qemu, another
>increase_reservation() is called.  If I make the suggested change, I
>suspect that qemu will fail to get its memory.
>
>Or is this upper limit not checked when increase_reservation() is
>called from dom0?

I think when call increase_reservation()  on qemu, it called
xc_domain_setmaxmem() firstly.
See followed code on vl.c:

    nr_pages = info.nr_pages + extra_pages;

    if ( xc_domain_setmaxmem(xc_handle, domid, ---------> setmaxmem here
                             (nr_pages) * PAGE_SIZE/1024 ) != 0)
    {
        fprintf(logfile, "set maxmem returned error %d\n", errno);
        exit(-1);
    }

    if ( (page_array = (unsigned long *)
                        malloc(nr_pages * sizeof(unsigned long))) ==
NULL)
    {
        fprintf(logfile, "malloc returned error %d\n", errno);
        exit(-1);
    }

    if (xc_domain_memory_increase_reservation(xc_handle, domid,
                                              extra_pages , 0, 0, NULL)
!= 0)
    {
        fprintf(logfile, "increase reservation returned error %d\n",
errno);
        exit(-1);
    }

>

_______________________________________________
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®.