Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2006 00:33:47 -0800
From:      Nate Lawson <nate@root.org>
To:        Scott Long <scottl@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_contig.c
Message-ID:  <43DC7DEB.7050200@root.org>
In-Reply-To: <20060129082512.6EBA116A477@hub.freebsd.org>
References:  <20060129082512.6EBA116A477@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

-- 
Nate



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