Date: Thu, 25 May 2006 13:43:45 -0400 From: John Baldwin <jhb@freebsd.org> To: Kip Macy <kmacy@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 97802 for review Message-ID: <200605251343.45838.jhb@freebsd.org> In-Reply-To: <200605250816.k4P8G1Ps040900@repoman.freebsd.org> References: <200605250816.k4P8G1Ps040900@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 25 May 2006 04:16, Kip Macy wrote: > 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 I added it for use on my green laptop back when it had a stick of ram with an address that had a bit stuck at 0. :-P Is it that expensive to lookup a single variable in the hints? I do wonder if this is what makes FreeBSD seem to "hang" during early boot after SI_SUB_CPU. > > 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); This seems unrelated? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605251343.45838.jhb>