From owner-p4-projects@FreeBSD.ORG Thu May 25 18:27:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD90316B542; Thu, 25 May 2006 18:27:53 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CF0516B538; Thu, 25 May 2006 18:27:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24B9143D48; Thu, 25 May 2006 18:27:32 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.0.1.114] (nat-outside.atlanta.corp.yahoo.com [63.172.193.57]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k4PIRVYQ004404; Thu, 25 May 2006 14:27:31 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Kip Macy Date: Thu, 25 May 2006 13:43:45 -0400 User-Agent: KMail/1.9.1 References: <200605250816.k4P8G1Ps040900@repoman.freebsd.org> In-Reply-To: <200605250816.k4P8G1Ps040900@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605251343.45838.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1484/Thu May 25 11:19:23 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 97802 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2006 18:28:03 -0000 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