From owner-p4-projects@FreeBSD.ORG Sat Apr 24 22:10:51 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDC131065670; Sat, 24 Apr 2010 22:10:50 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1B6B106566B for ; Sat, 24 Apr 2010 22:10:50 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9E85E8FC15 for ; Sat, 24 Apr 2010 22:10:50 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o3OMAoZB086196 for ; Sat, 24 Apr 2010 22:10:50 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o3OMAnLv086194 for perforce@freebsd.org; Sat, 24 Apr 2010 22:10:49 GMT (envelope-from anchie@FreeBSD.org) Date: Sat, 24 Apr 2010 22:10:49 GMT Message-Id: <201004242210.o3OMAnLv086194@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 177308 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2010 22:10:51 -0000 http://p4web.freebsd.org/@@177308?ac=10 Change 177308 by anchie@anchie_malimis on 2010/04/24 22:09:49 IFC @177307> Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/pmap.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/amd64/include/proc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/arm/arm/pmap.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/arm/include/proc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/conf/files.sparc64#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/conf/files.sun4v#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/drm/drmP.h#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/i386/i386/pmap.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/i386/include/proc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/i386/xen/pmap.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ia64/ia64/pmap.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ia64/include/proc.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/kern_proc.c#9 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/vfs_bio.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/vfs_subr.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/conf/SWARM#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/include/proc.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/include/vmparam.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/exception.S#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/pmap.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/sibyte/sb_machdep.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/aim/mmu_oea.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/aim/mmu_oea64.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/booke/pmap.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/include/proc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/powerpc/mmu_if.m#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/powerpc/pmap_dispatch.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sparc64/include/proc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sparc64/sparc64/pmap.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sun4v/include/proc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/buf.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/mount.h#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/user.h#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_alloc.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_balloc.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_extern.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_inode.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_snapshot.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_softdep.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_subr.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_vfsops.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/ffs_vnops.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/fs.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ffs/softdep.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/dinode.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/inode.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/ufs_dirhash.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/ufs_extern.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/ufs_lookup.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/ufs_vnops.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ufs/ufs/ufsmount.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/vm/pmap.h#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/vm/vm_mmap.c#6 integrate Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/pmap.c#7 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.688 2010/03/27 23:53:47 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.690 2010/04/24 21:17:07 kmacy Exp $"); /* * Manages physical address maps. @@ -236,6 +236,7 @@ static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); +static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); @@ -283,7 +284,7 @@ vm_offset_t newaddr = addr; newaddr = (addr + (NBPDR - 1)) & ~(NBPDR - 1); - return newaddr; + return (newaddr); } /********************/ @@ -294,7 +295,7 @@ static __inline vm_pindex_t pmap_pde_pindex(vm_offset_t va) { - return va >> PDRSHIFT; + return (va >> PDRSHIFT); } @@ -353,7 +354,7 @@ pml4e = pmap_pml4e(pmap, va); if ((*pml4e & PG_V) == 0) - return NULL; + return (NULL); return (pmap_pml4e_to_pdpe(pml4e, va)); } @@ -375,7 +376,7 @@ pdpe = pmap_pdpe(pmap, va); if (pdpe == NULL || (*pdpe & PG_V) == 0) - return NULL; + return (NULL); return (pmap_pdpe_to_pde(pdpe, va)); } @@ -397,7 +398,7 @@ pde = pmap_pde(pmap, va); if (pde == NULL || (*pde & PG_V) == 0) - return NULL; + return (NULL); if ((*pde & PG_PS) != 0) /* compat with i386 pmap_pte() */ return ((pt_entry_t *)pde); return (pmap_pde_to_pte(pde, va)); @@ -1236,7 +1237,7 @@ pa = (pa & PG_FRAME) | (va & PAGE_MASK); } } - return pa; + return (pa); } /*************************************************** @@ -1466,9 +1467,9 @@ --m->wire_count; if (m->wire_count == 0) - return _pmap_unwire_pte_hold(pmap, va, m, free); + return (_pmap_unwire_pte_hold(pmap, va, m, free)); else - return 0; + return (0); } static int @@ -1524,7 +1525,7 @@ */ pmap_add_delayed_free_list(m, free, TRUE); - return 1; + return (1); } /* @@ -1537,10 +1538,10 @@ vm_page_t mpte; if (va >= VM_MAXUSER_ADDRESS) - return 0; + return (0); KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0")); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return pmap_unwire_pte_hold(pmap, va, mpte, free); + return (pmap_unwire_pte_hold(pmap, va, mpte, free)); } void @@ -1731,7 +1732,7 @@ pmap->pm_stats.resident_count++; - return m; + return (m); } static vm_page_t @@ -3509,7 +3510,7 @@ pte_store(pte, pa | PG_V | PG_U); else pte_store(pte, pa | PG_V | PG_U | PG_MANAGED); - return mpte; + return (mpte); } /* @@ -3886,12 +3887,12 @@ int loops = 0; if (m->flags & PG_FICTITIOUS) - return FALSE; + return (FALSE); mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { - return TRUE; + return (TRUE); } loops++; if (loops >= 16) @@ -4178,6 +4179,49 @@ } /* + * pmap_is_referenced: + * + * Return whether or not the specified physical page was referenced + * in any physical maps. + */ +boolean_t +pmap_is_referenced(vm_page_t m) +{ + + if (m->flags & PG_FICTITIOUS) + return (FALSE); + if (pmap_is_referenced_pvh(&m->md)) + return (TRUE); + return (pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); +} + +/* + * Returns TRUE if any of the given mappings were referenced and FALSE + * otherwise. Both page and 2mpage mappings are supported. + */ +static boolean_t +pmap_is_referenced_pvh(struct md_page *pvh) +{ + pv_entry_t pv; + pt_entry_t *pte; + pmap_t pmap; + boolean_t rv; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rv = FALSE; + TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte(pmap, pv->pv_va); + rv = (*pte & (PG_A | PG_V)) == (PG_A | PG_V); + PMAP_UNLOCK(pmap); + if (rv) + break; + } + return (rv); +} + +/* * Clear the write and modified bits in each of the given page's mappings. */ void @@ -4864,7 +4908,7 @@ if (pte != 0) { val |= MINCORE_INCORE; if ((pte & PG_MANAGED) == 0) - return val; + return (val); m = PHYS_TO_VM_PAGE(pa); @@ -4893,14 +4937,12 @@ */ vm_page_lock_queues(); if ((m->flags & PG_REFERENCED) || - pmap_ts_referenced(m)) { + pmap_is_referenced(m)) val |= MINCORE_REFERENCED_OTHER; - vm_page_flag_set(m, PG_REFERENCED); - } vm_page_unlock_queues(); } } - return val; + return (val); } void ==== //depot/projects/soc2009/anchie_send/src/sys/amd64/include/proc.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 - * $FreeBSD: src/sys/amd64/include/proc.h,v 1.26 2009/04/01 13:09:26 kib Exp $ + * $FreeBSD: src/sys/amd64/include/proc.h,v 1.27 2010/04/24 12:49:52 kib Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -53,6 +53,9 @@ struct system_segment_descriptor md_ldt_sd; }; +#define KINFO_PROC_SIZE 1088 +#define KINFO_PROC32_SIZE 768 + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ ==== //depot/projects/soc2009/anchie_send/src/sys/arm/arm/pmap.c#8 (text+ko) ==== @@ -140,7 +140,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.119 2010/03/21 21:03:35 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.120 2010/04/24 17:32:52 alc Exp $"); #include #include #include @@ -4493,6 +4493,20 @@ /* + * pmap_is_referenced: + * + * Return whether or not the specified physical page was referenced + * in any physical maps. + */ +boolean_t +pmap_is_referenced(vm_page_t m) +{ + + return ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0 && + (m->md.pvh_attrs & PVF_REF) != 0); +} + +/* * pmap_clear_reference: * * Clear the reference bit on the specified physical page. ==== //depot/projects/soc2009/anchie_send/src/sys/arm/include/proc.h#2 (text+ko) ==== @@ -32,7 +32,7 @@ * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 * from: FreeBSD: src/sys/i386/include/proc.h,v 1.11 2001/06/29 - * $FreeBSD: src/sys/arm/include/proc.h,v 1.6 2009/02/12 23:23:30 cognet Exp $ + * $FreeBSD: src/sys/arm/include/proc.h,v 1.7 2010/04/24 12:49:52 kib Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -60,4 +60,6 @@ void *md_sigtramp; }; +#define KINFO_PROC_SIZE 792 + #endif /* !_MACHINE_PROC_H_ */ ==== //depot/projects/soc2009/anchie_send/src/sys/conf/files.sparc64#5 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sparc64,v 1.112 2010/04/10 11:52:12 marius Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.113 2010/04/24 16:27:43 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -22,7 +22,7 @@ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" # -crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/atkbdc/atkbd.c optional atkbd atkbdc dev/atkbdc/atkbd_atkbdc.c optional atkbd atkbdc @@ -42,11 +42,11 @@ dev/le/if_le_lebuffer.c optional le sbus dev/le/if_le_ledma.c optional le sbus dev/le/lebuffer_sbus.c optional le sbus -dev/ofw/ofw_if.m standard dev/ofw/ofw_bus_if.m standard dev/ofw/ofw_bus_subr.c standard +dev/ofw/ofw_console.c optional ofw_console +dev/ofw/ofw_if.m standard dev/ofw/ofw_standard.c standard -dev/ofw/ofw_console.c optional ofw_console dev/ofw/openfirm.c standard dev/ofw/openfirmio.c standard dev/ofw/openpromio.c standard @@ -79,7 +79,7 @@ sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci sparc64/pci/psycho.c optional pci -sparc64/pci/sbbc.c optional uart sbbc +sparc64/pci/sbbc.c optional sbbc uart sparc64/pci/schizo.c optional pci sparc64/sbus/dma_sbus.c optional sbus sparc64/sbus/sbus.c optional sbus ==== //depot/projects/soc2009/anchie_send/src/sys/conf/files.sun4v#3 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sun4v,v 1.20 2009/12/23 21:04:31 marius Exp $ +# $FreeBSD: src/sys/conf/files.sun4v,v 1.21 2010/04/24 16:27:43 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -18,12 +18,12 @@ clean "ukbdmap.h" # # -crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/ofw/ofw_bus_if.m standard -dev/ofw/ofw_if.m standard dev/ofw/ofw_bus_subr.c standard dev/ofw/ofw_console.c optional ofw_console +dev/ofw/ofw_if.m standard dev/ofw/ofw_standard.c standard dev/ofw/openfirm.c standard dev/ofw/openfirmio.c standard ==== //depot/projects/soc2009/anchie_send/src/sys/dev/drm/drmP.h#7 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/drmP.h,v 1.45 2010/04/23 14:48:30 rnoland Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/drmP.h,v 1.46 2010/04/24 18:13:12 rnoland Exp $"); #ifndef _DRM_P_H_ #define _DRM_P_H_ @@ -481,7 +481,6 @@ vm_offset_t vaddr; vm_paddr_t *busaddr; vm_pindex_t pages; - vm_object_t obj; } drm_sg_mem_t; #define DRM_MAP_HANDLE_BITS (sizeof(void *) == 4 ? 4 : 24) ==== //depot/projects/soc2009/anchie_send/src/sys/i386/i386/pmap.c#7 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.670 2010/03/27 23:53:47 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.672 2010/04/24 21:36:52 kmacy Exp $"); /* * Manages physical address maps. @@ -296,6 +296,7 @@ static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); +static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); @@ -1606,9 +1607,9 @@ --m->wire_count; if (m->wire_count == 0) - return _pmap_unwire_pte_hold(pmap, m, free); + return (_pmap_unwire_pte_hold(pmap, m, free)); else - return 0; + return (0); } static int @@ -1642,7 +1643,7 @@ */ pmap_add_delayed_free_list(m, free, TRUE); - return 1; + return (1); } /* @@ -1656,10 +1657,10 @@ vm_page_t mpte; if (va >= VM_MAXUSER_ADDRESS) - return 0; + return (0); ptepde = *pmap_pde(pmap, va); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return pmap_unwire_pte_hold(pmap, mpte, free); + return (pmap_unwire_pte_hold(pmap, mpte, free)); } void @@ -1810,7 +1811,7 @@ pmap->pm_pdir[ptepindex] = (pd_entry_t) (ptepa | PG_U | PG_RW | PG_V | PG_A | PG_M); - return m; + return (m); } static vm_page_t @@ -2008,7 +2009,7 @@ { unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; - return sysctl_handle_long(oidp, &ksize, 0, req); + return (sysctl_handle_long(oidp, &ksize, 0, req)); } SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, 0, 0, kvm_size, "IU", "Size of KVM"); @@ -2018,7 +2019,7 @@ { unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end; - return sysctl_handle_long(oidp, &kfree, 0, req); + return (sysctl_handle_long(oidp, &kfree, 0, req)); } SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, 0, 0, kvm_free, "IU", "Amount of KVM free"); @@ -2082,7 +2083,7 @@ pv_to_chunk(pv_entry_t pv) { - return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK); + return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK)); } #define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) @@ -3661,7 +3662,7 @@ pte_store(pte, pa | PG_V | PG_U); else pte_store(pte, pa | PG_V | PG_U | PG_MANAGED); - return mpte; + return (mpte); } /* @@ -4058,12 +4059,12 @@ int loops = 0; if (m->flags & PG_FICTITIOUS) - return FALSE; + return (FALSE); mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { - return TRUE; + return (TRUE); } loops++; if (loops >= 16) @@ -4356,6 +4357,51 @@ } /* + * pmap_is_referenced: + * + * Return whether or not the specified physical page was referenced + * in any physical maps. + */ +boolean_t +pmap_is_referenced(vm_page_t m) +{ + + if (m->flags & PG_FICTITIOUS) + return (FALSE); + if (pmap_is_referenced_pvh(&m->md)) + return (TRUE); + return (pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); +} + +/* + * Returns TRUE if any of the given mappings were referenced and FALSE + * otherwise. Both page and 4mpage mappings are supported. + */ +static boolean_t +pmap_is_referenced_pvh(struct md_page *pvh) +{ + pv_entry_t pv; + pt_entry_t *pte; + pmap_t pmap; + boolean_t rv; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rv = FALSE; + sched_pin(); + TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte_quick(pmap, pv->pv_va); + rv = (*pte & (PG_A | PG_V)) == (PG_A | PG_V); + PMAP_UNLOCK(pmap); + if (rv) + break; + } + sched_unpin(); + return (rv); +} + +/* * Clear the write and modified bits in each of the given page's mappings. */ void @@ -4932,7 +4978,7 @@ if (pte != 0) { val |= MINCORE_INCORE; if ((pte & PG_MANAGED) == 0) - return val; + return (val); m = PHYS_TO_VM_PAGE(pa); @@ -4961,14 +5007,12 @@ */ vm_page_lock_queues(); if ((m->flags & PG_REFERENCED) || - pmap_ts_referenced(m)) { + pmap_is_referenced(m)) val |= MINCORE_REFERENCED_OTHER; - vm_page_flag_set(m, PG_REFERENCED); - } vm_page_unlock_queues(); } } - return val; + return (val); } void @@ -5063,7 +5107,7 @@ printf("\n"); } sx_sunlock(&allproc_lock); - return npte; + return (npte); } pte = pmap_pte(pmap, va); if (pte && pmap_pte_v(pte)) { @@ -5088,7 +5132,7 @@ } } sx_sunlock(&allproc_lock); - return npte; + return (npte); } #endif ==== //depot/projects/soc2009/anchie_send/src/sys/i386/include/proc.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 - * $FreeBSD: src/sys/i386/include/proc.h,v 1.28 2008/09/12 09:53:29 kib Exp $ + * $FreeBSD: src/sys/i386/include/proc.h,v 1.29 2010/04/24 12:49:52 kib Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -57,6 +57,8 @@ struct proc_ldt *md_ldt; /* (t) per-process ldt */ }; +#define KINFO_PROC_SIZE 768 + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ ==== //depot/projects/soc2009/anchie_send/src/sys/i386/xen/pmap.c#7 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/xen/pmap.c,v 1.33 2010/02/21 01:13:34 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/xen/pmap.c,v 1.34 2010/04/24 17:32:52 alc Exp $"); /* * Manages physical address maps. @@ -3718,6 +3718,34 @@ return (rv); } +boolean_t +pmap_is_referenced(vm_page_t m) +{ + pv_entry_t pv; + pt_entry_t *pte; + pmap_t pmap; + boolean_t rv; + + rv = FALSE; + if (m->flags & PG_FICTITIOUS) + return (rv); + sched_pin(); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pte = pmap_pte_quick(pmap, pv->pv_va); + rv = (*pte & (PG_A | PG_V)) == (PG_A | PG_V); + PMAP_UNLOCK(pmap); + if (rv) + break; + } + if (*PMAP1) + PT_SET_MA(PADDR1, 0); + sched_unpin(); + return (rv); +} + void pmap_map_readonly(pmap_t pmap, vm_offset_t va, int len) { @@ -4145,10 +4173,8 @@ */ vm_page_lock_queues(); if ((m->flags & PG_REFERENCED) || - pmap_ts_referenced(m)) { + pmap_is_referenced(m)) val |= MINCORE_REFERENCED_OTHER; - vm_page_flag_set(m, PG_REFERENCED); - } vm_page_unlock_queues(); } } ==== //depot/projects/soc2009/anchie_send/src/sys/ia64/ia64/pmap.c#5 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.213 2010/03/22 18:24:42 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.214 2010/04/24 17:32:52 alc Exp $"); #include #include @@ -2023,6 +2023,37 @@ } /* + * pmap_is_referenced: + * + * Return whether or not the specified physical page was referenced + * in any physical maps. + */ +boolean_t +pmap_is_referenced(vm_page_t m) +{ + struct ia64_lpte *pte; + pmap_t oldpmap; + pv_entry_t pv; + boolean_t rv; + + rv = FALSE; + if (m->flags & PG_FICTITIOUS) + return (rv); + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + PMAP_LOCK(pv->pv_pmap); + oldpmap = pmap_switch(pv->pv_pmap); + pte = pmap_find_vhpt(pv->pv_va); + pmap_switch(oldpmap); + KASSERT(pte != NULL, ("pte")); + rv = pmap_accessed(pte) ? TRUE : FALSE; + PMAP_UNLOCK(pv->pv_pmap); + if (rv) + break; + } + return (rv); +} + +/* * Clear the modify bits on the specified physical page. */ void @@ -2197,10 +2228,8 @@ * Referenced by someone */ vm_page_lock_queues(); - if (pmap_ts_referenced(m)) { + if (pmap_is_referenced(m)) val |= MINCORE_REFERENCED_OTHER; - vm_page_flag_set(m, PG_REFERENCED); - } vm_page_unlock_queues(); } } ==== //depot/projects/soc2009/anchie_send/src/sys/ia64/include/proc.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/include/proc.h,v 1.16 2009/10/31 22:27:31 marcel Exp $ + * $FreeBSD: src/sys/ia64/include/proc.h,v 1.17 2010/04/24 12:49:52 kib Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -38,4 +38,7 @@ int __dummy; /* Avoid having an empty struct. */ }; +#define KINFO_PROC_SIZE 1088 +#define KINFO_PROC32_SIZE 768 + #endif /* !_MACHINE_PROC_H_ */ ==== //depot/projects/soc2009/anchie_send/src/sys/kern/kern_proc.c#9 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.295 2010/04/21 20:04:42 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.296 2010/04/24 12:49:52 kib Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -151,6 +151,9 @@ SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); +#ifdef COMPAT_FREEBSD32 +CTASSERT(sizeof(struct kinfo_proc32) == KINFO_PROC32_SIZE); +#endif /* * Initialize global process hashing structures. ==== //depot/projects/soc2009/anchie_send/src/sys/kern/vfs_bio.c#5 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.569 2010/04/02 15:12:31 avg Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.570 2010/04/24 07:05:35 jeff Exp $"); #include #include @@ -216,6 +216,14 @@ static int bd_request; /* + * Request for the buf daemon to write more buffers than is indicated by + * lodirtybuf. This may be necessary to push out excess dependencies or + * defragment the address space where a simple count of the number of dirty + * buffers is insufficient to characterize the demand for flushing them. + */ +static int bd_speedupreq; + +/* * This lock synchronizes access to bd_request. */ static struct mtx bdlock; @@ -467,12 +475,20 @@ * bd_speedup - speedup the buffer cache flushing code */ -static __inline void bd_speedup(void) { + int needwake; - bd_wakeup(1); + mtx_lock(&bdlock); + needwake = 0; + if (bd_speedupreq == 0 || bd_request == 0) + needwake = 1; + bd_speedupreq = 1; + bd_request = 1; + if (needwake) + wakeup(&bd_request); + mtx_unlock(&bdlock); } /* @@ -2120,6 +2136,7 @@ static void buf_daemon() { + int lodirtysave; /* * This process needs to be suspended prior to shutdown sync. @@ -2137,7 +2154,11 @@ mtx_unlock(&bdlock); kproc_suspend_check(bufdaemonproc); - + lodirtysave = lodirtybuffers; + if (bd_speedupreq) { + lodirtybuffers = numdirtybuffers / 2; + bd_speedupreq = 0; + } /* * Do the flush. Limit the amount of in-transit I/O we * allow to build up, otherwise we would completely saturate @@ -2149,6 +2170,7 @@ break; uio_yield(); } + lodirtybuffers = lodirtysave; /* * Only clear bd_request if we have reached our low water ==== //depot/projects/soc2009/anchie_send/src/sys/kern/vfs_subr.c#7 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.779 2010/04/04 14:48:43 jh Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.780 2010/04/24 07:05:35 jeff Exp $"); #include "opt_ddb.h" @@ -2815,6 +2815,7 @@ MNT_FLAG(MNT_FORCE); MNT_FLAG(MNT_SNAPSHOT); MNT_FLAG(MNT_BYFSID); + MNT_FLAG(MNT_SOFTDEP); #undef MNT_FLAG if (flags != 0) { if (buf[0] != '\0') ==== //depot/projects/soc2009/anchie_send/src/sys/mips/conf/SWARM#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/sys/mips/conf/SWARM,v 1.9 2010/04/17 01:49:50 jmallett Exp $ +# $FreeBSD: src/sys/mips/conf/SWARM,v 1.10 2010/04/23 19:20:56 jmallett Exp $ # ident SWARM @@ -8,12 +8,6 @@ files "../sibyte/files.sibyte" hints "SWARM.hints" -# -# 32-bit kernel cannot deal with physical memory beyond 4GB -# XXX pmap assumes that all the memory can be mapped using KSEG0 -# -options MAXMEM=512*1024 - options CFE options CFE_CONSOLE options CFE_ENV ==== //depot/projects/soc2009/anchie_send/src/sys/mips/include/proc.h#4 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)proc.h 8.1 (Berkeley) 6/10/93 * JNPR: proc.h,v 1.7.2.1 2007/09/10 06:25:24 girish - * $FreeBSD: src/sys/mips/include/proc.h,v 1.4 2010/04/18 22:32:07 jmallett Exp $ + * $FreeBSD: src/sys/mips/include/proc.h,v 1.5 2010/04/24 12:49:52 kib Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -68,4 +68,10 @@ void mips_cpu_switch(struct thread *, struct thread *, struct mtx *); void mips_cpu_throw(struct thread *, struct thread *); +#ifdef __mips_n64 +#define KINFO_PROC_SIZE 1088 +#else +#define KINFO_PROC_SIZE 816 +#endif + #endif /* !_MACHINE_PROC_H_ */ ==== //depot/projects/soc2009/anchie_send/src/sys/mips/include/vmparam.h#3 (text+ko) ==== @@ -37,7 +37,7 @@ * from: Utah Hdr: vmparam.h 1.16 91/01/18 * @(#)vmparam.h 8.2 (Berkeley) 4/22/94 * JNPR: vmparam.h,v 1.3.2.1 2007/09/10 06:01:28 girish - * $FreeBSD: src/sys/mips/include/vmparam.h,v 1.3 2010/04/17 07:20:01 jmallett Exp $ + * $FreeBSD: src/sys/mips/include/vmparam.h,v 1.4 2010/04/24 03:11:35 jmallett Exp $ */ #ifndef _MACHINE_VMPARAM_H_ @@ -152,9 +152,9 @@ #define VM_PHYSSEG_MAX 32 /* - * The physical address space is densely populated. >>> TRUNCATED FOR MAIL (1000 lines) <<<