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
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"