diff options
author | John Dyson <dyson@FreeBSD.org> | 1996-09-08 16:57:53 +0000 |
---|---|---|
committer | John Dyson <dyson@FreeBSD.org> | 1996-09-08 16:57:53 +0000 |
commit | b8e251a56d5a4f30a8948e7dfdf7b80cdfff5c8f (patch) | |
tree | 394c6f62b7590c92ba4fde4385637bf0bce8b7c8 /sys/amd64/include/pmap.h | |
parent | fe134be8f8375d9b97cfb813a8c9990d8fdefaad (diff) | |
download | src-b8e251a56d5a4f30a8948e7dfdf7b80cdfff5c8f.tar.gz src-b8e251a56d5a4f30a8948e7dfdf7b80cdfff5c8f.zip |
Improve the scalability of certain pmap operations.
Notes
Notes:
svn path=/head/; revision=18163
Diffstat (limited to 'sys/amd64/include/pmap.h')
-rw-r--r-- | sys/amd64/include/pmap.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 64b682c91928..2c4e46972a96 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -42,12 +42,13 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $Id: pmap.h,v 1.41 1996/07/27 03:23:32 dyson Exp $ + * $Id: pmap.h,v 1.42 1996/07/30 03:08:57 dyson Exp $ */ #ifndef _MACHINE_PMAP_H_ #define _MACHINE_PMAP_H_ + /* * Page-directory and page-table entires follow this format, with a few * of the fields not present here and there, depending on a lot of things. @@ -113,6 +114,9 @@ #define ISA_HOLE_LENGTH (0x100000-ISA_HOLE_START) #ifndef LOCORE + +#include <sys/queue.h> + typedef unsigned int *pd_entry_t; typedef unsigned int *pt_entry_t; @@ -158,33 +162,47 @@ pmap_kextract(vm_offset_t va) } #endif +struct vm_page; + /* * Pmap stuff */ +struct pv_entry; +typedef struct { + int pv_list_count; + struct vm_page *pv_vm_page; + TAILQ_HEAD(,pv_entry) pv_list; +} pv_table_t; struct pmap { pd_entry_t *pm_pdir; /* KVA of page directory */ vm_object_t pm_pteobj; /* Container for pte's */ - short pm_dref; /* page directory ref count */ - short pm_count; /* pmap reference count */ + TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ + int pm_count; /* reference count */ + int pm_flags; /* pmap flags */ struct pmap_statistics pm_stats; /* pmap statistics */ - struct vm_map *pm_map; /* map that owns this pmap */ + struct vm_page *pm_ptphint; /* pmap ptp hint */ }; +#define PM_FLAG_LOCKED 0x1 +#define PM_FLAG_WANTED 0x2 + typedef struct pmap *pmap_t; #ifdef KERNEL extern pmap_t kernel_pmap; #endif + /* * For each vm_page_t, there is a list of all currently valid virtual * mappings of that page. An entry is a pv_entry_t, the list is pv_table. */ typedef struct pv_entry { - struct pv_entry *pv_next; /* next pv_entry */ pmap_t pv_pmap; /* pmap where mapping lies */ vm_offset_t pv_va; /* virtual address for mapping */ + TAILQ_ENTRY(pv_entry) pv_list; + TAILQ_ENTRY(pv_entry) pv_plist; vm_page_t pv_ptem; /* VM page for pte */ } *pv_entry_t; @@ -200,7 +218,7 @@ extern pt_entry_t *CMAP1; extern vm_offset_t avail_end; extern vm_offset_t avail_start; extern vm_offset_t phys_avail[]; -extern pv_entry_t *pv_table; /* array of entries, one per page */ +pv_table_t *pv_table; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; |