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: printk too chatty when tmem enabled

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tmem: printk too chatty when tmem enabled
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 22 Nov 2009 23:35:24 -0800
Delivery-date: Sun, 22 Nov 2009 23:35:58 -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 1258958818 0
# Node ID 27d816a4bfb2481f18ed4edde451288522bb937d
# Parent  8f200fe950afea593792df3eedcded98fe803a72
tmem: printk too chatty when tmem enabled

Two gdprintk's that are rarely encountered with tmem disabled
are frequent but meaningless when tmem is enabled.  Printing
these tens-to-hundreds of times per second (in certain
circumstances even higher) slows down domain execution.

Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
---
 xen/common/memory.c     |   10 ++++++----
 xen/common/page_alloc.c |    6 ++++--
 xen/include/xen/tmem.h  |    1 +
 3 files changed, 11 insertions(+), 6 deletions(-)

diff -r 8f200fe950af -r 27d816a4bfb2 xen/common/memory.c
--- a/xen/common/memory.c       Mon Nov 23 06:45:03 2009 +0000
+++ b/xen/common/memory.c       Mon Nov 23 06:46:58 2009 +0000
@@ -19,6 +19,7 @@
 #include <xen/guest_access.h>
 #include <xen/hypercall.h>
 #include <xen/errno.h>
+#include <xen/tmem.h>
 #include <asm/current.h>
 #include <asm/hardirq.h>
 #include <xen/numa.h>
@@ -120,10 +121,11 @@ static void populate_physmap(struct memo
             page = alloc_domheap_pages(d, a->extent_order, a->memflags);
             if ( unlikely(page == NULL) ) 
             {
-                gdprintk(XENLOG_INFO, "Could not allocate order=%d extent: "
-                         "id=%d memflags=%x (%ld of %d)\n",
-                         a->extent_order, d->domain_id, a->memflags,
-                         i, a->nr_extents);
+                if ( !opt_tmem || (a->extent_order != 0) )
+                    gdprintk(XENLOG_INFO, "Could not allocate order=%d extent:"
+                             " id=%d memflags=%x (%ld of %d)\n",
+                             a->extent_order, d->domain_id, a->memflags,
+                             i, a->nr_extents);
                 goto out;
             }
 
diff -r 8f200fe950af -r 27d816a4bfb2 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Mon Nov 23 06:45:03 2009 +0000
+++ b/xen/common/page_alloc.c   Mon Nov 23 06:46:58 2009 +0000
@@ -1049,8 +1049,10 @@ int assign_pages(
     {
         if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
         {
-            gdprintk(XENLOG_INFO, "Over-allocation for domain %u: %u > %u\n",
-                    d->domain_id, d->tot_pages + (1 << order), d->max_pages);
+            if ( !opt_tmem || order != 0 || d->tot_pages != d->max_pages )
+                gdprintk(XENLOG_INFO, "Over-allocation for domain %u: "
+                         "%u > %u\n", d->domain_id,
+                         d->tot_pages + (1 << order), d->max_pages);
             goto fail;
         }
 
diff -r 8f200fe950af -r 27d816a4bfb2 xen/include/xen/tmem.h
--- a/xen/include/xen/tmem.h    Mon Nov 23 06:45:03 2009 +0000
+++ b/xen/include/xen/tmem.h    Mon Nov 23 06:46:58 2009 +0000
@@ -12,5 +12,6 @@ extern void init_tmem(void);
 extern void init_tmem(void);
 extern void tmem_destroy(void *);
 extern void *tmem_relinquish_pages(unsigned int, unsigned int);
+extern int  opt_tmem;
 
 #endif /* __XEN_TMEM_H__ */

_______________________________________________
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: printk too chatty when tmem enabled, Xen patchbot-unstable <=