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] tmem: fix freeable memory accounting error

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] tmem: fix freeable memory accounting error
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Mon, 23 Nov 2009 11:42:33 -0800 (PST)
Delivery-date: Mon, 23 Nov 2009 11:44:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Fix tmem accounting error that causes an "apparent"
memory leak, creating false negatives when testing
memory availability for launching a new domain.

Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>

diff -r 5bfc7e343207 xen/include/xen/tmem_xen.h
--- a/xen/include/xen/tmem_xen.h        Mon Nov 23 11:08:51 2009 -0700
+++ b/xen/include/xen/tmem_xen.h        Mon Nov 23 12:39:37 2009 -0700
@@ -229,7 +229,7 @@ static inline struct page_info *tmh_allo
     if ( pi == NULL && !no_heap )
         pi = alloc_domheap_pages(0,0,MEMF_tmem);
     ASSERT((pi == NULL) || IS_VALID_PAGE(pi));
-    if ( pi != NULL )
+    if ( pi != NULL && !no_heap )
         atomic_inc(&freeable_page_count);
     return pi;
 }

Attachment: tmem-freeable.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] tmem: fix freeable memory accounting error, Dan Magenheimer <=