From owner-cvs-src@FreeBSD.ORG Sun Jan 29 08:35:41 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE39116A420; Sun, 29 Jan 2006 08:35:41 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AD9B43D45; Sun, 29 Jan 2006 08:35:40 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k0T8Zbu4057133; Sun, 29 Jan 2006 01:35:37 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43DC7E5B.9080906@samsco.org> Date: Sun, 29 Jan 2006 01:35:39 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <20060129082512.6EBA116A477@hub.freebsd.org> <43DC7DEB.7050200@root.org> In-Reply-To: <43DC7DEB.7050200@root.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Scott Long , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_contig.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2006 08:35:41 -0000 Nate Lawson wrote: > Scott Long wrote: > >> scottl 2006-01-29 08:24:54 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/vm vm_contig.c Log: >> The change a few years ago of having contigmalloc start its scan at >> the top >> of physical RAM instead of the bottom was a sound idea, but the >> implementation >> left a lot to be desired. Scans would spend considerable time >> looking at >> pages that are above of the address range given by the caller, and >> multiple >> calls (like what happens in busdma) would spend more time on top of >> that >> rescanning the same pages over and over. > > > Interesting. > >> Index: src/sys/vm/vm_contig.c >> diff -u src/sys/vm/vm_contig.c:1.47 src/sys/vm/vm_contig.c:1.48 >> --- src/sys/vm/vm_contig.c:1.47 Thu Jan 26 05:51:26 2006 >> +++ src/sys/vm/vm_contig.c Sun Jan 29 08:24:54 2006 >> @@ -387,7 +387,9 @@ >> vm_offset_t size; >> vm_paddr_t phys; >> vm_page_t pga = vm_page_array; >> - int i, pass, pqtype, start; >> + static vm_pindex_t np = 0; >> + static vm_pindex_t start = 0; >> + int i, pass, pqtype; > > > What lock protects access to these static variables? > The whole function is serialized by Giant. Scott