[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Add debug code to catch count_info errors in page_alloc.c



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236872232 0
# Node ID 97f78142cd4ceb75ecf498df554fb589c4797b9a
# Parent  dd3219cd019a173b3f393ab4a719df0068a818ee
Add debug code to catch count_info errors in page_alloc.c

This patch is temporary.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/page_alloc.c |    8 +++++++-
 xen/common/sysctl.c     |    2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -r dd3219cd019a -r 97f78142cd4c xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Thu Mar 12 15:31:36 2009 +0000
+++ b/xen/common/page_alloc.c   Thu Mar 12 15:37:12 2009 +0000
@@ -403,6 +403,9 @@ static struct page_info *alloc_heap_page
     for ( i = 0; i < (1 << order); i++ )
     {
         /* Reference count must continuously be zero for free pages. */
+        if ( pg[i].count_info != 0 )
+            printk("** %s:%d -- %u/%u %lx\n", __FILE__, __LINE__,
+                   i, 1 << order, pg[i].count_info);
         BUG_ON(pg[i].count_info != 0);
 
         if ( pg[i].u.free.need_tlbflush )
@@ -527,7 +530,10 @@ static void free_heap_pages(
          *     in its pseudophysical address space).
          * In all the above cases there can be no guest mappings of this page.
          */
-        ASSERT(!(pg[i].count_info & PGC_offlined));
+        if ( pg[i].count_info & PGC_offlined )
+            printk("** %s:%d -- %u/%u %lx\n", __FILE__, __LINE__,
+                   i, 1 << order, pg[i].count_info);
+        BUG_ON(pg[i].count_info & PGC_offlined);
         pg[i].count_info &= PGC_offlining | PGC_broken;
         if ( pg[i].count_info & PGC_offlining )
         {
diff -r dd3219cd019a -r 97f78142cd4c xen/common/sysctl.c
--- a/xen/common/sysctl.c       Thu Mar 12 15:31:36 2009 +0000
+++ b/xen/common/sysctl.c       Thu Mar 12 15:37:12 2009 +0000
@@ -238,6 +238,8 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
         uint32_t *status, *ptr;
         unsigned long pfn;
 
+        BUG();
+
         ptr = status = xmalloc_bytes( sizeof(uint32_t) *
                                 (op->u.page_offline.end -
                                   op->u.page_offline.start + 1));

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.