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] confused about the balloon code

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] confused about the balloon code
From: tgh <tianguanhua@xxxxxxxxxx>
Date: Sat, 28 Apr 2007 09:13:41 +0800
Delivery-date: Fri, 27 Apr 2007 18:12:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7D748C767B7FA541A8AC5504A4C89A23015685FC@xxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7D748C767B7FA541A8AC5504A4C89A23015685FC@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
hi
I try to understand the code of balloon ,and got confused about the following parts of code:

static int decrease_reservation(unsigned long nr_pages)
{
        ....
       if (!PageHighMem(page)) {
           v = phys_to_virt(pfn << PAGE_SHIFT);
           scrub_pages(v, 1);
           ret = HYPERVISOR_update_va_mapping(
               (unsigned long)v, __pte_ma(0), 0);
           BUG_ON(ret);
       }
#ifdef CONFIG_XEN_SCRUB_PAGES
       else {
           v = kmap(page);
           scrub_pages(v, 1);
           kunmap(page);
       }
#endif
    ....
}

I am confused about the scrub_pages(), what is the meaning of scrub_pages, when should we use CONFIG_XEN_SCRUB_PAGES
could you help me
Thanks in advance



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

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