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

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] tmem: printk too chatty when tmem enabled
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Mon, 16 Nov 2009 14:44:21 -0800 (PST)
Delivery-date: Mon, 16 Nov 2009 14:45:10 -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
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>

diff -r bec27eb6f72c xen/common/memory.c
--- a/xen/common/memory.c       Sat Nov 14 10:32:59 2009 +0000
+++ b/xen/common/memory.c       Mon Nov 16 15:42:58 2009 -0700
@@ -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,7 +121,8 @@ 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: "
+                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);
diff -r bec27eb6f72c xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Sat Nov 14 10:32:59 2009 +0000
+++ b/xen/common/page_alloc.c   Mon Nov 16 15:42:58 2009 -0700
@@ -1049,7 +1049,8 @@ int assign_pages(
     {
         if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
         {
-            gdprintk(XENLOG_INFO, "Over-allocation for domain %u: %u > %u\n",
+            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 bec27eb6f72c xen/include/xen/tmem.h
--- a/xen/include/xen/tmem.h    Sat Nov 14 10:32:59 2009 +0000
+++ b/xen/include/xen/tmem.h    Mon Nov 16 15:42:58 2009 -0700
@@ -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__ */

Attachment: tmem-toochatty.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: printk too chatty when tmem enabled, Dan Magenheimer <=