diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-12-11 17:19:48 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-12-11 17:19:48 +0000 |
commit | fd8805df000b68f061013f444749f8d5e546c090 (patch) | |
tree | 9d51e7679d8d2520dbf695dc26c64c614b8c10ff /sys/powerpc/include | |
parent | a17e44c25805a7b00f15693e883cac5f2135e432 (diff) | |
download | FreeBSD-src-fd8805df000b68f061013f444749f8d5e546c090.zip FreeBSD-src-fd8805df000b68f061013f444749f8d5e546c090.tar.gz |
Keep track of PVO entries in each pmap, which allows much faster
pmap_remove() for large sparse requests. This can prevent pmap_remove()
operations on 64-bit process destruction or swapout that would take
several hundred times the lifetime of the universe to complete. This
behavior is largely indistinguishable from a hang.
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r-- | sys/powerpc/include/pmap.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index 688975d..ca13c18 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -88,28 +88,13 @@ struct pmap_md { #endif /* !defined(NPMAPS) */ struct slbtnode; - -struct pmap { - struct mtx pm_mtx; - - #ifdef __powerpc64__ - struct slbtnode *pm_slb_tree_root; - struct slb **pm_slb; - int pm_slb_len; - #else - register_t pm_sr[16]; - #endif - cpuset_t pm_active; - - struct pmap *pmap_phys; - struct pmap_statistics pm_stats; -}; - +struct pmap; typedef struct pmap *pmap_t; struct pvo_entry { LIST_ENTRY(pvo_entry) pvo_vlink; /* Link to common virt page */ LIST_ENTRY(pvo_entry) pvo_olink; /* Link to overflow entry */ + LIST_ENTRY(pvo_entry) pvo_plink; /* Link to pmap entries */ union { struct pte pte; /* 32 bit PTE */ struct lpte lpte; /* 64 bit PTE */ @@ -137,6 +122,23 @@ LIST_HEAD(pvo_head, pvo_entry); ((void)((pvo)->pvo_vaddr |= (i)|PVO_PTEGIDX_VALID)) #define PVO_VSID(pvo) ((pvo)->pvo_vpn >> 16) +struct pmap { + struct mtx pm_mtx; + + #ifdef __powerpc64__ + struct slbtnode *pm_slb_tree_root; + struct slb **pm_slb; + int pm_slb_len; + #else + register_t pm_sr[16]; + #endif + cpuset_t pm_active; + + struct pmap *pmap_phys; + struct pmap_statistics pm_stats; + struct pvo_head pmap_pvo; +}; + struct md_page { u_int64_t mdpg_attrs; vm_memattr_t mdpg_cache_attrs; |