summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-02-17 15:36:29 +0000
committeralc <alc@FreeBSD.org>2011-02-17 15:36:29 +0000
commit2f4da8e71efe2c607bdfa327d079c9088d2946be (patch)
tree687208f3c3e244874a52b3d66f4d856704482e84
parent7cc094bd03bf8fd9f30266bd1b10041ec3bc27d0 (diff)
downloadFreeBSD-src-2f4da8e71efe2c607bdfa327d079c9088d2946be.zip
FreeBSD-src-2f4da8e71efe2c607bdfa327d079c9088d2946be.tar.gz
Remove pmap fields that are either unused or not fully implemented.
Discussed with: kib
-rw-r--r--sys/amd64/include/pmap.h2
-rw-r--r--sys/arm/include/pmap.h2
-rw-r--r--sys/i386/include/pmap.h2
-rw-r--r--sys/ia64/include/pmap.h2
-rw-r--r--sys/mips/include/pmap.h2
-rw-r--r--sys/powerpc/include/pmap.h7
-rw-r--r--sys/sparc64/include/pmap.h2
-rw-r--r--sys/sun4v/include/pmap.h2
-rw-r--r--sys/vm/vm_page.c14
9 files changed, 1 insertions, 34 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index c597cb2..e4bd829 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -251,8 +251,6 @@ struct pmap {
pml4_entry_t *pm_pml4; /* KVA of level 4 page table */
TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */
cpumask_t pm_active; /* active on cpus */
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
/* spare u_int here due to padding */
struct pmap_statistics pm_stats; /* pmap statistics */
vm_page_t pm_root; /* spare page table pages */
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h
index 9acd558..701390a 100644
--- a/sys/arm/include/pmap.h
+++ b/sys/arm/include/pmap.h
@@ -134,8 +134,6 @@ struct pmap {
struct l1_ttable *pm_l1;
struct l2_dtable *pm_l2[L2_SIZE];
pd_entry_t *pm_pdir; /* KVA of page directory */
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
cpumask_t pm_active; /* active on cpus */
struct pmap_statistics pm_stats; /* pmap statictics */
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index 3d09588..8d0c4a5 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -436,8 +436,6 @@ struct pmap {
cpumask_t pm_active; /* active on cpus */
struct pmap_statistics pm_stats; /* pmap statistics */
LIST_ENTRY(pmap) pm_list; /* List of all pmaps */
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
#ifdef PAE
pdpt_entry_t *pm_pdpt; /* KVA of page director pointer
table */
diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h
index 0aa4029..2b6088c 100644
--- a/sys/ia64/include/pmap.h
+++ b/sys/ia64/include/pmap.h
@@ -77,8 +77,6 @@ struct pmap {
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
uint32_t pm_rid[5]; /* base RID for pmap */
struct pmap_statistics pm_stats; /* pmap statistics */
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
};
typedef struct pmap *pmap_t;
diff --git a/sys/mips/include/pmap.h b/sys/mips/include/pmap.h
index 795de44..10623a8 100644
--- a/sys/mips/include/pmap.h
+++ b/sys/mips/include/pmap.h
@@ -79,8 +79,6 @@ struct pmap {
pd_entry_t *pm_segtab; /* KVA of segment table */
TAILQ_HEAD(, pv_entry) pm_pvlist; /* list of mappings in
* pmap */
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
cpumask_t pm_active; /* active on cpus */
struct {
u_int32_t asid:ASID_BITS; /* TLB address space tag */
diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h
index 2b26185..369ca9d 100644
--- a/sys/powerpc/include/pmap.h
+++ b/sys/powerpc/include/pmap.h
@@ -99,8 +99,6 @@ struct pmap {
register_t pm_sr[16];
#endif
cpumask_t pm_active;
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
struct pmap *pmap_phys;
struct pmap_statistics pm_stats;
@@ -178,16 +176,11 @@ struct pmap {
struct mtx pm_mtx; /* pmap mutex */
tlbtid_t pm_tid[MAXCPU]; /* TID to identify this pmap entries in TLB */
cpumask_t pm_active; /* active on cpus */
- int pm_refs; /* ref count */
struct pmap_statistics pm_stats; /* pmap statistics */
/* Page table directory, array of pointers to page tables. */
pte_t *pm_pdir[PDIR_NENTRIES];
- /* generation count (pmap lock dropped) */
- uint32_t pm_gen_count;
- u_int pm_retries;
-
/* List of allocated ptbl bufs (ptbl kva regions). */
TAILQ_HEAD(, ptbl_buf) pm_ptbl_list;
};
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h
index a195724..e16ea97 100644
--- a/sys/sparc64/include/pmap.h
+++ b/sys/sparc64/include/pmap.h
@@ -62,8 +62,6 @@ struct pmap {
struct tte *pm_tsb;
vm_object_t pm_tsb_obj;
cpumask_t pm_active;
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
u_int pm_context[MAXCPU];
struct pmap_statistics pm_stats;
};
diff --git a/sys/sun4v/include/pmap.h b/sys/sun4v/include/pmap.h
index aa3f9e1..9c2c486 100644
--- a/sys/sun4v/include/pmap.h
+++ b/sys/sun4v/include/pmap.h
@@ -74,8 +74,6 @@ struct pmap {
struct tte_hash *pm_hash;
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
struct hv_tsb_info pm_tsb;
- uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
- u_int pm_retries;
cpumask_t pm_active; /* mask of cpus currently using pmap */
cpumask_t pm_tlbactive; /* mask of cpus that have used this pmap */
struct pmap_statistics pm_stats;
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 3f0b501..e4e4a77 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -152,10 +152,6 @@ TUNABLE_INT("vm.boot_pages", &boot_pages);
SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0,
"number of pages allocated for bootstrapping the VM system");
-static int pa_tryrelock_race;
-SYSCTL_INT(_vm, OID_AUTO, tryrelock_race, CTLFLAG_RD,
- &pa_tryrelock_race, 0, "Number of tryrelock race cases");
-
static int pa_tryrelock_restart;
SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD,
&pa_tryrelock_restart, 0, "Number of tryrelock restarts");
@@ -181,9 +177,7 @@ int
vm_page_pa_tryrelock(pmap_t pmap, vm_paddr_t pa, vm_paddr_t *locked)
{
vm_paddr_t lockpa;
- uint32_t gen_count;
- gen_count = pmap->pm_gen_count;
lockpa = *locked;
*locked = pa;
if (lockpa) {
@@ -198,13 +192,7 @@ vm_page_pa_tryrelock(pmap_t pmap, vm_paddr_t pa, vm_paddr_t *locked)
atomic_add_int(&pa_tryrelock_restart, 1);
PA_LOCK(pa);
PMAP_LOCK(pmap);
-
- if (pmap->pm_gen_count != gen_count + 1) {
- pmap->pm_retries++;
- atomic_add_int(&pa_tryrelock_race, 1);
- return (EAGAIN);
- }
- return (0);
+ return (EAGAIN);
}
/*
OpenPOWER on IntegriCloud