PERFORCE change 97802 for review
Kip Macy
kmacy at FreeBSD.org
Thu May 25 08:16:56 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=97802
Change 97802 by kmacy at 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);
}
More information about the p4-projects
mailing list