PERFORCE change 90820 for review
Alan Cox
alc at FreeBSD.org
Tue Jan 31 11:36:11 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=90820
Change 90820 by alc at alc_home on 2006/01/31 19:35:43
Make another change to preempt_contig_alloc() in order to stop it
from allocating base pages. Update an assertion accordingly.
(The previous revision only handled one of the two ways that this
could happen.)
Change the creation of the reservation zone to include
UMA_ZONE_NOFREE. (I don't know that this is needed. I'm being
paranoid.)
Affected files ...
.. //depot/projects/superpages/src/sys/vm/vm_reserve.c#13 edit
Differences ...
==== //depot/projects/superpages/src/sys/vm/vm_reserve.c#13 (text+ko) ====
@@ -406,7 +406,7 @@
int i;
sp_zone = uma_zcreate("VM RESERVE", sizeof(struct vm_reserve),
- NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM);
KASSERT(sp_zone,("preempt_init: unable to initialize sp_zone"));
for (i = -1; i < SP_LEVELS - 1; i++)
@@ -527,7 +527,7 @@
goto done;
/* 2. retry free pool at level-1 if level=SP_LEVELS-1 */
- if (lev == SP_LEVELS - 1) {
+ if (lev > 0 && lev == SP_LEVELS - 1) {
lev--;
goto retry;
}
@@ -593,7 +593,7 @@
mtx_unlock(&rres_mtx);
}
done:
- KASSERT(lev >= -1, ("preempt_contig_alloc: invalid level"));
+ KASSERT(lev > -1, ("preempt_contig_alloc: invalid level"));
if (level != NULL)
*level = lev;
return (m);
More information about the p4-projects
mailing list