Date: Tue, 31 Jan 2006 19:36:09 GMT From: Alan Cox <alc@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 90820 for review Message-ID: <200601311936.k0VJa9He066323@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=90820 Change 90820 by alc@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601311936.k0VJa9He066323>