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

[Xen-changelog] [xen-unstable] tmem: printk too chatty when tmem enabled



# 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


 


Rackspace

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