Date: Sun, 20 Jan 2008 05:51:51 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133708 for review Message-ID: <200801200551.m0K5ppJq066917@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133708 Change 133708 by scottl@scottl-deimos on 2008/01/20 05:51:33 Bring in new pmap functionality and VM asserts. Affected files ... .. //depot/projects/xen31-xenbus/sys/i386/xen/pmap.c#4 integrate .. //depot/projects/xen31-xenbus/sys/vm/vm_page.c#2 integrate Differences ... ==== //depot/projects/xen31-xenbus/sys/i386/xen/pmap.c#4 (text+ko) ==== @@ -1767,7 +1767,6 @@ vm_paddr_t ptppaddr; vm_page_t nkpg; pd_entry_t newpdir; - pt_entry_t *pde; mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { @@ -1808,19 +1807,12 @@ pmap_zero_page(nkpg); ptppaddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); -#ifdef notyet - PD_SET_VA(kernel_pmap, &pdir_pde(kernel_pmap->pm_pdir, kernel_vm_end), newpdir, TRUE); -#else - panic("implement me"); -#endif + PD_SET_VA(kernel_pmap, (kernel_vm_end >> PDRSHIFT), newpdir, TRUE); mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(pmap, &allpmaps, pm_list) { - pde = pmap_pde(pmap, kernel_vm_end); -#ifdef notyet - PD_SET_VA(pmap, pde, newpdir, FALSE); -#endif - } + LIST_FOREACH(pmap, &allpmaps, pm_list) + PD_SET_VA(pmap, (kernel_vm_end >> PDRSHIFT), newpdir, FALSE); + PT_UPDATES_FLUSH(); mtx_unlock_spin(&allpmaps_lock); kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); ==== //depot/projects/xen31-xenbus/sys/vm/vm_page.c#2 (text+ko) ==== @@ -139,6 +139,7 @@ int vm_page_array_size = 0; long first_page = 0; int vm_page_zero_count = 0; +extern unsigned long physfree; static int boot_pages = UMA_BOOT_PAGES; TUNABLE_INT("vm.boot_pages", &boot_pages); @@ -494,6 +495,8 @@ { m->flags &= ~PG_ZERO; + + KASSERT(VM_PAGE_TO_PHYS(m) >= physfree, ("freeing page from initial memory 0x%jx", VM_PAGE_TO_PHYS(m))); vm_page_free_toq(m); } @@ -507,6 +510,7 @@ { m->flags |= PG_ZERO; + KASSERT(VM_PAGE_TO_PHYS(m) >= physfree, ("freeing page from initial memory 0x%jx", VM_PAGE_TO_PHYS(m))); vm_page_free_toq(m); } @@ -1156,6 +1160,8 @@ if (vm_paging_needed()) pagedaemon_wakeup(); + + KASSERT(VM_PAGE_TO_PHYS(m) >= physfree, ("allocating page from initial memory 0x%jx", VM_PAGE_TO_PHYS(m))); return (m); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801200551.m0K5ppJq066917>