diff options
author | alc <alc@FreeBSD.org> | 2013-03-12 02:12:47 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-03-12 02:12:47 +0000 |
commit | 7c12a136b676a1bb8b9f1e7b36218bdc122cf2a7 (patch) | |
tree | b7950ee2e4a9ed8e3f1cae5550cbd94aa458e898 /sys/amd64/include/pmap.h | |
parent | 32a3275e771047e681f39d6bb4f4a64b6450c89d (diff) | |
download | FreeBSD-src-7c12a136b676a1bb8b9f1e7b36218bdc122cf2a7.zip FreeBSD-src-7c12a136b676a1bb8b9f1e7b36218bdc122cf2a7.tar.gz |
When a superpage promotion occurs, the page table page that the superpage
mapping replaces is added to an ordered collection of page table pages.
Rather than preserving the code that implements the splay tree of pages
in the pmap for just this one purpose, use the new MI radix tree. The
extra overhead of using a radix tree for this purpose is small enough,
about 4% added run-time to pmap_promote_pde(), that I don't see the point
of preserving the splay tree code.
Diffstat (limited to 'sys/amd64/include/pmap.h')
-rw-r--r-- | sys/amd64/include/pmap.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 24fd2bc..6d76ec3 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -150,6 +150,8 @@ #include <sys/_lock.h> #include <sys/_mutex.h> +#include <vm/_vm_radix.h> + typedef u_int64_t pd_entry_t; typedef u_int64_t pt_entry_t; typedef u_int64_t pdp_entry_t; @@ -235,20 +237,10 @@ struct pv_entry; struct pv_chunk; struct md_page { - union { - TAILQ_HEAD(,pv_entry) pvi_list; - struct { - vm_page_t pii_left; - vm_page_t pii_right; - } pvi_siters; - } pv_structs; - int pat_mode; + TAILQ_HEAD(,pv_entry) pv_list; + int pat_mode; }; -#define pv_list pv_structs.pvi_list -#define pv_left pv_structs.pvi_siters.pii_left -#define pv_right pv_structs.pvi_siters.pii_right - /* * The kernel virtual address (KVA) of the level 4 page table page is always * within the direct map (DMAP) region. @@ -260,7 +252,7 @@ struct pmap { cpuset_t pm_active; /* active on cpus */ /* spare u_int here due to padding */ struct pmap_statistics pm_stats; /* pmap statistics */ - vm_page_t pm_root; /* spare page table pages */ + struct vm_radix pm_root; /* spare page table pages */ }; typedef struct pmap *pmap_t; |