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] [PATCH 4 of 4] xenpaging: handle paged pages in p2m_pod_decr

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4 of 4] xenpaging: handle paged pages in p2m_pod_decrease_reservation
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 03 Oct 2011 16:43:57 +0200
Delivery-date: Mon, 03 Oct 2011 07:49:09 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1317653055; l=1194; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=7DrV4g9yrqncPM4CpawGVRR/Ln4=; b=c9NZNLTPE7LMXSBVqX1TxmAQo7/LUmNrMSZ/904eP6m3igBRd9tEmBTGE9GvzQWFn39 rauV+Ra9JBbxOywMYCqNHALPzhtkLyY/Um6Br+u86SleiPdtEAhtc4g9KCOYWzveKPqTI AiWg9dhwJfyevGS7nVuVRQTTgFB54baE9IU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1317653033@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: <patchbomb.1317653033@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1317652812 -7200
# Node ID b05ede64aaf5f5090fdb844c3a58f1f92d9b3588
# Parent  13872c432c3807e0f977d9c1311801179807ece2
xenpaging: handle paged pages in p2m_pod_decrease_reservation

As suggested by <hongkaixing@xxxxxxxxxx>, handle paged pages in PoD code.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 13872c432c38 -r b05ede64aaf5 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -567,6 +567,21 @@ p2m_pod_decrease_reservation(struct doma
             BUG_ON(p2m->pod.entry_count < 0);
             pod--;
         }
+        else if ( steal_for_cache && p2m_is_paging(t) )
+        {
+            struct page_info *page;
+            /* alloc a new page to compensate the pod list */
+            page = alloc_domheap_page(d, 0);
+            if ( !page )
+                goto out_entry_check;
+            set_p2m_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid, 
p2m->default_access);
+            p2m_mem_paging_drop_page(d, gpfn+i);
+            p2m_pod_cache_add(p2m, page, 0);
+            steal_for_cache =  ( p2m->pod.entry_count > p2m->pod.count );
+            nonpod--;
+            ram--;
+        }
+        /* for other ram types */
         else if ( steal_for_cache && p2m_is_ram(t) )
         {
             struct page_info *page;

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