Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm disable some DEBUG code uvm_pglist_add() that has se...



details:   https://anonhg.NetBSD.org/src/rev/50d8982acfd2
branches:  trunk
changeset: 755702:50d8982acfd2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Jun 17 03:13:58 2010 +0000

description:
disable some DEBUG code uvm_pglist_add() that has severe performance
problems with large mappings.  i've seen my system hang for a total
of 45 seconds when radeondrm is opened by X11, and it is the checks
in this function that take so long.

diffstat:

 sys/uvm/uvm_pglist.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 2caa03cf9285 -r 50d8982acfd2 sys/uvm/uvm_pglist.c
--- a/sys/uvm/uvm_pglist.c      Thu Jun 17 03:10:21 2010 +0000
+++ b/sys/uvm/uvm_pglist.c      Thu Jun 17 03:13:58 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pglist.c,v 1.45 2009/03/10 03:27:24 nonaka Exp $   */
+/*     $NetBSD: uvm_pglist.c,v 1.46 2010/06/17 03:13:58 mrg Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.45 2009/03/10 03:27:24 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.46 2010/06/17 03:13:58 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,7 +82,7 @@
 uvm_pglist_add(struct vm_page *pg, struct pglist *rlist)
 {
        int free_list, color, pgflidx;
-#ifdef DEBUG
+#ifdef NOT_DEBUG
        struct vm_page *tp;
 #endif
 
@@ -95,7 +95,7 @@
        free_list = uvm_page_lookup_freelist(pg);
        color = VM_PGCOLOR_BUCKET(pg);
        pgflidx = (pg->flags & PG_ZERO) ? PGFL_ZEROS : PGFL_UNKNOWN;
-#ifdef DEBUG
+#ifdef NOT_DEBUG
        for (tp = LIST_FIRST(&uvm.page_free[
                free_list].pgfl_buckets[color].pgfl_queues[pgflidx]);
             tp != NULL;



Home | Main Index | Thread Index | Old Index