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] tmem: Reduce verbosity on failed memory a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tmem: Reduce verbosity on failed memory allocations.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Jan 2010 04:00:18 -0800
Delivery-date: Fri, 08 Jan 2010 04:00:34 -0800
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 1262949922 0
# Node ID 277bfc2d47b1912a4a6994ed53157ff630413bdb
# Parent  13b349c42eed80cd12549e17b8f4ead3df50ffbc
tmem: Reduce verbosity on failed memory allocations.

Reduce tmem complaints per Jan's concerns in this thread
http://lists.xensource.com/archives/html/xen-devel/2010-01/msg00155.html
Now complains only if tmem HAS memory to relinquish and
memory request has order>0.

Signed-off by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
---
 xen/common/tmem.c          |    4 ++--
 xen/include/xen/tmem_xen.h |    7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff -r 13b349c42eed -r 277bfc2d47b1 xen/common/tmem.c
--- a/xen/common/tmem.c Fri Jan 08 11:24:18 2010 +0000
+++ b/xen/common/tmem.c Fri Jan 08 11:25:22 2010 +0000
@@ -2177,7 +2177,7 @@ static NOINLINE int do_tmem_control(stru
         ret = tmemc_set_var(op->u.ctrl.cli_id,subop,op->u.ctrl.arg1);
         break;
     case TMEMC_QUERY_FREEABLE_MB:
-        ret = tmh_freeable_mb();
+        ret = tmh_freeable_pages() >> (20 - PAGE_SHIFT);
         break;
     case TMEMC_SAVE_BEGIN:
     case TMEMC_RESTORE_BEGIN:
@@ -2474,7 +2474,7 @@ EXPORT void *tmem_relinquish_pages(unsig
     unsigned long evicts_per_relinq = 0;
     int max_evictions = 10;
 
-    if (!tmh_enabled())
+    if (!tmh_enabled() || !tmh_freeable_pages())
         return NULL;
 #ifdef __i386__
     return NULL;
diff -r 13b349c42eed -r 277bfc2d47b1 xen/include/xen/tmem_xen.h
--- a/xen/include/xen/tmem_xen.h        Fri Jan 08 11:24:18 2010 +0000
+++ b/xen/include/xen/tmem_xen.h        Fri Jan 08 11:25:22 2010 +0000
@@ -246,10 +246,9 @@ static inline unsigned int tmem_subpage_
     return tmh_mempool_maxalloc;
 }
 
-static inline unsigned long tmh_freeable_mb(void)
-{
-    return (tmh_avail_pages() + _atomic_read(freeable_page_count)) >>
-            (20 - PAGE_SHIFT);
+static inline unsigned long tmh_freeable_pages(void)
+{
+    return tmh_avail_pages() + _atomic_read(freeable_page_count);
 }
 
 static inline unsigned long tmh_free_mb(void)

_______________________________________________
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] tmem: Reduce verbosity on failed memory allocations., Xen patchbot-unstable <=