From owner-svn-src-all@FreeBSD.ORG Wed Mar 18 16:24:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECCBF1065672; Wed, 18 Mar 2009 16:24:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFE2C8FC1A; Wed, 18 Mar 2009 16:24:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2IGOdMG031167; Wed, 18 Mar 2009 16:24:39 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2IGOdKk031166; Wed, 18 Mar 2009 16:24:39 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200903181624.n2IGOdKk031166@svn.freebsd.org> From: Alan Cox Date: Wed, 18 Mar 2009 16:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189968 - stable/7/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 16:24:40 -0000 Author: alc Date: Wed Mar 18 16:24:39 2009 New Revision: 189968 URL: http://svn.freebsd.org/changeset/base/189968 Log: MFC revision 1.363 Eliminate redundant code from vm_page_startup(). (In retrospect, this change should have been included in the superpages MFC. This change subsumes r189750.) Discussed with: jhb Modified: stable/7/sys/vm/vm_page.c Modified: stable/7/sys/vm/vm_page.c ============================================================================== --- stable/7/sys/vm/vm_page.c Wed Mar 18 16:19:44 2009 (r189967) +++ stable/7/sys/vm/vm_page.c Wed Mar 18 16:24:39 2009 (r189968) @@ -209,7 +209,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; @@ -224,9 +223,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; @@ -252,7 +248,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]; @@ -320,8 +315,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; /* @@ -363,22 +356,6 @@ vm_page_startup(vm_offset_t vaddr) vm_page_array[i].order = VM_NFREEORDER; vm_page_array_size = page_range; -#if 0 - /* - * This assertion tests the hypothesis that npages and total are - * redundant. XXX - * - * XXX: This always fails if VM_NRESERVLEVEL > 0 because - * npages includes the memory for vm_reserv_startup() but - * page_range doesn't. - */ - 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")); -#endif - /* * Initialize the physical memory allocator. */