PERFORCE change 120398 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri May 25 19:58:02 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=120398
Change 120398 by hselasky at hselasky_mini_itx on 2007/05/25 19:57:40
Fix a showstopper or panic source in vm_contig.c.
Affected files ...
.. //depot/projects/usb/src/sys/vm/vm_contig.c#6 edit
Differences ...
==== //depot/projects/usb/src/sys/vm/vm_contig.c#6 (text+ko) ====
@@ -400,7 +400,10 @@
static vm_pindex_t np = 0;
static vm_pindex_t start = 0;
vm_pindex_t startl = 0;
- int i, pass, pqtype;
+ vm_pindex_t temp;
+ int i, pqtype;
+ uint8_t pass;
+ uint8_t j;
size = npages << PAGE_SHIFT;
if (size == 0)
@@ -485,7 +488,18 @@
pqtype != PQ_CACHE) {
if (m->queue == PQ_ACTIVE ||
m->queue == PQ_INACTIVE) {
- if (vm_contig_launder_page(m) != 0)
+ /* NOTE: The function
+ * "vm_config_launder_page()"
+ * can sleep. To ensure that
+ * this function operates
+ * coherently we need to
+ * suspend/resume the "start"
+ * variable:
+ */
+ temp = start;
+ j = vm_contig_launder_page(m) ? 1 : 0;
+ start = temp;
+ if (j)
goto cleanup_freed;
pqtype = m->queue - m->pc;
if (pqtype != PQ_FREE &&
@@ -520,7 +534,7 @@
goto retry_page;
}
/*
- * We've found a contiguous chunk that meets are requirements.
+ * We've found a contiguous chunk that meets our requirements.
*/
np = npages;
startl = start;
More information about the p4-projects
mailing list