svn commit: r189968 - stable/7/sys/vm
Alan Cox
alc at FreeBSD.org
Wed Mar 18 09:24:40 PDT 2009
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.
*/
More information about the svn-src-stable-7
mailing list