From owner-cvs-all@FreeBSD.ORG Thu Mar 5 18:28:12 2009 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC991065675; Thu, 5 Mar 2009 18:28:12 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 47D0B8FC14; Thu, 5 Mar 2009 18:28:12 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 97A9A2C2A81; Thu, 5 Mar 2009 12:06:32 -0600 (CST) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0hYCvQ5S1Q4F; Thu, 5 Mar 2009 12:06:24 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 73B2F2C2A91; Thu, 5 Mar 2009 12:06:24 -0600 (CST) Message-ID: <49B0149D.7000004@cs.rice.edu> Date: Thu, 05 Mar 2009 12:06:21 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <200712190547.lBJ5lpCU039889@repoman.freebsd.org> <20090302081445.GA2993@garage.freebsd.pl> In-Reply-To: <20090302081445.GA2993@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_page.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 18:28:13 -0000 Pawel Jakub Dawidek wrote: > On Wed, Dec 19, 2007 at 05:47:51AM +0000, Alan Cox wrote: > >> alc 2007-12-19 05:47:51 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/vm vm_page.c >> Log: >> Eliminate redundant code from vm_page_startup(). >> >> Revision Changes Path >> 1.363 +0 -17 src/sys/vm/vm_page.c >> >> http://cvsweb.FreeBSD.org/src/sys/vm/vm_page.c.diff?r1=1.362&r2=1.363&f=h >> --- src/sys/vm/vm_page.c 2007/12/11 21:20:34 1.362 >> +++ src/sys/vm/vm_page.c 2007/12/19 05:47:50 1.363 >> @@ -97,7 +97,7 @@ >> */ >> >> #include >> -__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/vm/vm_page.c,v 1.362 2007/12/11 21:20:34 alc Exp $"); >> +__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/vm/vm_page.c,v 1.363 2007/12/19 05:47:50 alc Exp $"); >> >> #include >> #include >> @@ -201,7 +201,6 @@ vm_offset_t >> vm_page_startup(vm_offset_t vaddr) >> { >> vm_offset_t mapped; >> - vm_size_t npages; >> vm_paddr_t page_range; >> vm_paddr_t new_end; >> int i; >> @@ -216,9 +215,6 @@ vm_page_startup(vm_offset_t vaddr) >> vm_paddr_t low_water, high_water; >> int biggestone; >> >> - vm_paddr_t total; >> - >> - total = 0; >> biggestsize = 0; >> biggestone = 0; >> nblocks = 0; >> @@ -244,7 +240,6 @@ vm_page_startup(vm_offset_t vaddr) >> if (phys_avail[i + 1] > high_water) >> high_water = phys_avail[i + 1]; >> ++nblocks; >> - total += size; >> } >> >> end = phys_avail[biggestone+1]; >> @@ -308,8 +303,6 @@ vm_page_startup(vm_offset_t vaddr) >> #else >> #error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." >> #endif >> - npages = (total - (page_range * sizeof(struct vm_page)) - >> - (end - new_end)) / PAGE_SIZE; >> end = new_end; >> >> /* >> @@ -345,16 +338,6 @@ vm_page_startup(vm_offset_t vaddr) >> vm_page_array_size = page_range; >> >> /* >> - * This assertion tests the hypothesis that npages and total are >> - * redundant. XXX >> - */ >> - page_range = 0; >> - for (i = 0; phys_avail[i + 1] != 0; i += 2) >> - page_range += atop(phys_avail[i + 1] - phys_avail[i]); >> - KASSERT(page_range == npages, >> - ("vm_page_startup: inconsistent page counts")); >> - >> - /* >> * Initialize the physical memory allocator. >> */ >> vm_phys_init(); >> > > This assertion is triggered on my 7-STABLE machine. It was fine when it > was running 6.1, but now after upgrade it panics. If this assert is > bogus could you MFC it to 7-STABLE as well? > > Hmm. The assertion is not bogus. It is a legitimate initialization time consistency check. I removed it from HEAD because no one reported it failing over a period of two years, so I thought it could be removed and the code simplified. Are you using a kernel from before or after the superpages MFC? Alan