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-unstable] Add debug code to catch count_info errors

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Add debug code to catch count_info errors in page_alloc.c
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Mar 2009 08:40:10 -0700
Delivery-date: Thu, 12 Mar 2009 08:40:18 -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 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Add debug code to catch count_info errors in page_alloc.c, Xen patchbot-unstable <=