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-changelog

[Xen-changelog] [xen-3.4-testing] x86: Fix PoD cache size when decreasin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86: Fix PoD cache size when decreasing memory
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 07 Sep 2009 01:05:53 -0700
Delivery-date: Mon, 07 Sep 2009 01:07:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1252309913 -3600
# Node ID 11a597a09d213653e165887a1460715c7ff617b3
# Parent  719b67c4cc21cbaf0238d675a9b9fd696db56abe
x86: Fix PoD cache size when decreasing memory

Certain paths through p2m_pod_decrease_reservation() fail to reduce
the size of the PoD cache if the number of outstanding entries is less
than the size of the cache.  Rearrange so this doesn't happen.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
xen-unstable changeset:   20159:ead107bc25cb
xen-unstable date:        Fri Sep 04 08:43:05 2009 +0100
---
 xen/arch/x86/mm/p2m.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff -r 719b67c4cc21 -r 11a597a09d21 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Mon Sep 07 08:51:25 2009 +0100
+++ b/xen/arch/x86/mm/p2m.c     Mon Sep 07 08:51:53 2009 +0100
@@ -624,7 +624,7 @@ p2m_pod_decrease_reservation(struct doma
         p2md->pod.entry_count-=(1<<order); /* Lock: p2m */
         BUG_ON(p2md->pod.entry_count < 0);
         ret = 1;
-        goto out_unlock;
+        goto out_entry_check;
     }
 
     /* FIXME: Steal contig 2-meg regions for cache */
@@ -668,17 +668,18 @@ p2m_pod_decrease_reservation(struct doma
         }
     }    
 
-    /* If we've reduced our "liabilities" beyond our "assets", free some */
-    if ( p2md->pod.entry_count < p2md->pod.count )
-    {
-        printk("b %d\n", p2md->pod.entry_count);
-        p2m_pod_set_cache_target(d, p2md->pod.entry_count);
-    }
-
     /* If there are no more non-PoD entries, tell decrease_reservation() that
      * there's nothing left to do. */
     if ( nonpod == 0 )
         ret = 1;
+
+out_entry_check:
+    /* If we've reduced our "liabilities" beyond our "assets", free some */
+    if ( p2md->pod.entry_count < p2md->pod.count )
+    {
+        printk("b %d\n", p2md->pod.entry_count);
+        p2m_pod_set_cache_target(d, p2md->pod.entry_count);
+    }
 
 out_unlock:
     audit_p2m(d);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] x86: Fix PoD cache size when decreasing memory, Xen patchbot-3.4-testing <=