cvs commit: src/sys/vm vm_contig.c
Scott Long
scottl at FreeBSD.org
Sun Jan 29 00:24:56 PST 2006
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.
Solve this, at least for now, with two simple optimizations. The first is
to not bother scanning high ordered pages that are outside of the provided
address range. Second is to cache the page index from the last successful
operation so that subsequent scans don't have to restart from the top. This
is conditional on the numpages argument being the same or greater between
calls.
MFC After: 2 weeks
Revision Changes Path
1.48 +19 -2 src/sys/vm/vm_contig.c
More information about the cvs-src
mailing list