From mboxrd@z Thu Jan 1 00:00:00 1970 From: tgh Subject: confused about the balloon code Date: Sat, 28 Apr 2007 09:13:41 +0800 Message-ID: <46329FC5.10408@ncic.ac.cn> References: <7D748C767B7FA541A8AC5504A4C89A23015685FC@SAUSEXMB2.amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <7D748C767B7FA541A8AC5504A4C89A23015685FC@SAUSEXMB2.amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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