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__ */
tmem-toochatty.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|