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

[Xen-devel] [PATCH] tmem: fix freeable memory accounting error



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

 


Rackspace

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