Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2006 08:16:01 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 97802 for review
Message-ID:  <200605250816.k4P8G1Ps040900@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97802

Change 97802 by kmacy@kmacy_storage:sun4v_work on 2006/05/25 08:15:13

	only conditionally compile tunable stalling boot

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/vm/vm_pageq.c#5 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/vm/vm_pageq.c#5 (text+ko) ====

@@ -52,7 +52,7 @@
 
 static void vm_coloring_init(void);
 void setPQL2(int *const size, int *const ways);
-
+extern int smp_started;
 struct vpgqueues vm_page_queues[PQ_MAXCOUNT];
 struct pq_coloring page_queue_coloring;
 
@@ -191,10 +191,14 @@
 vm_page_t
 vm_pageq_add_new_page(vm_paddr_t pa)
 {
+	vm_page_t m;
+
+/* 
+ * This virtually unused tunable increases the boot time on sun4v by > 10x
+ */
+#ifdef ENABLE_PADDR_BLACKLIST
 	vm_paddr_t bad;
-	vm_page_t m;
 	char *cp, *list, *pos;
-
 	/*
 	 * See if a physical address in this page has been listed
 	 * in the blacklist tunable.  Entries in the tunable are
@@ -222,16 +226,20 @@
 		}
 		freeenv(list);
 	}
-
+#endif
 	atomic_add_int(&cnt.v_page_count, 1);
 	m = PHYS_TO_VM_PAGE(pa);
 	m->phys_addr = pa;
 	m->flags = 0;
 	m->pc = (pa >> PAGE_SHIFT) & PQ_COLORMASK;
 	pmap_page_init(m);
-	mtx_lock_spin(&vm_page_queue_free_mtx);
-	vm_pageq_enqueue(m->pc + PQ_FREE, m);
-	mtx_unlock_spin(&vm_page_queue_free_mtx);
+	if (!smp_started) {
+		vm_pageq_enqueue(m->pc + PQ_FREE, m);
+	} else {
+		mtx_lock_spin(&vm_page_queue_free_mtx);
+		vm_pageq_enqueue(m->pc + PQ_FREE, m);
+		mtx_unlock_spin(&vm_page_queue_free_mtx);
+	}
 	return (m);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605250816.k4P8G1Ps040900>