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

[Xen-devel] Re: [PATCH 2/5] xen/balloon: account for pages released duri

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 2/5] xen/balloon: account for pages released during memory setup
From: David Vrabel <david.vrabel@xxxxxxxxxx>
Date: Thu, 8 Sep 2011 16:01:23 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 08 Sep 2011 08:03:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110906213139.GB24860@xxxxxxxxxxxx>
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: <1313765840-22084-1-git-send-email-david.vrabel@xxxxxxxxxx> <1313765840-22084-3-git-send-email-david.vrabel@xxxxxxxxxx> <20110906213139.GB24860@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110818 Icedove/3.0.11
On 06/09/11 22:31, Konrad Rzeszutek Wilk wrote:
> On Fri, Aug 19, 2011 at 03:57:17PM +0100, David Vrabel wrote:
>> 
>> --- a/drivers/xen/balloon.c
>> +++ b/drivers/xen/balloon.c
>> @@ -557,15 +557,20 @@ EXPORT_SYMBOL(free_xenballooned_pages);
>>  
>>  static int __init balloon_init(void)
>>  {
>> +    domid_t domid = DOMID_SELF;
>>      unsigned long pfn, extra_pfn_end;
>>      struct page *page;
>> +    int ret;
> 
> long int?

int looks correct to me.  From arch/x86/include/asm/xen/hypercall.h:

static inline int
HYPERVISOR_memory_op(unsigned int cmd, void *arg)
{
        return _hypercall2(int, memory_op, cmd, arg);
}

>>  
>>      if (!xen_domain())
>>              return -ENODEV;
>>  
>>      pr_info("xen/balloon: Initialising balloon driver.\n");
>>  
>> -    balloon_stats.current_pages = xen_pv_domain() ? 
>> min(xen_start_info->nr_pages, max_pfn) : max_pfn;
>> +    ret = HYPERVISOR_memory_op(XENMEM_current_reservation, &domid);
>> +    if (ret < 0)
>> +            return ret;
>> +    balloon_stats.current_pages = ret;
>>      balloon_stats.target_pages  = balloon_stats.current_pages;
>>      balloon_stats.balloon_low   = 0;
>>      balloon_stats.balloon_high  = 0;
>> -- 
>> 1.7.2.5


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

<Prev in Thread] Current Thread [Next in Thread>