From owner-p4-projects@FreeBSD.ORG Tue Jan 31 19:36:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 628BE16A423; Tue, 31 Jan 2006 19:36:10 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BFCB16A420 for ; Tue, 31 Jan 2006 19:36:10 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0881043D45 for ; Tue, 31 Jan 2006 19:36:10 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0VJa9ia066326 for ; Tue, 31 Jan 2006 19:36:09 GMT (envelope-from alc@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0VJa9He066323 for perforce@freebsd.org; Tue, 31 Jan 2006 19:36:09 GMT (envelope-from alc@freebsd.org) Date: Tue, 31 Jan 2006 19:36:09 GMT Message-Id: <200601311936.k0VJa9He066323@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alc@freebsd.org using -f From: Alan Cox To: Perforce Change Reviews Cc: Subject: PERFORCE change 90820 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2006 19:36:11 -0000 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);