Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Feb 2011 15:36:29 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218773 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/include vm
Message-ID:  <201102171536.p1HFaTf7015684@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Thu Feb 17 15:36:29 2011
New Revision: 218773
URL: http://svn.freebsd.org/changeset/base/218773

Log:
  Remove pmap fields that are either unused or not fully implemented.
  
  Discussed with:	kib

Modified:
  head/sys/amd64/include/pmap.h
  head/sys/arm/include/pmap.h
  head/sys/i386/include/pmap.h
  head/sys/ia64/include/pmap.h
  head/sys/mips/include/pmap.h
  head/sys/powerpc/include/pmap.h
  head/sys/sparc64/include/pmap.h
  head/sys/sun4v/include/pmap.h
  head/sys/vm/vm_page.c

Modified: head/sys/amd64/include/pmap.h
==============================================================================
--- head/sys/amd64/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/amd64/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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 */

Modified: head/sys/arm/include/pmap.h
==============================================================================
--- head/sys/arm/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/arm/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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 */

Modified: head/sys/i386/include/pmap.h
==============================================================================
--- head/sys/i386/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/i386/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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 */

Modified: head/sys/ia64/include/pmap.h
==============================================================================
--- head/sys/ia64/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/ia64/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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;

Modified: head/sys/mips/include/pmap.h
==============================================================================
--- head/sys/mips/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/mips/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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 */

Modified: head/sys/powerpc/include/pmap.h
==============================================================================
--- head/sys/powerpc/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/powerpc/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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;
 };

Modified: head/sys/sparc64/include/pmap.h
==============================================================================
--- head/sys/sparc64/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/sparc64/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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;
 };

Modified: head/sys/sun4v/include/pmap.h
==============================================================================
--- head/sys/sun4v/include/pmap.h	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/sun4v/include/pmap.h	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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;

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Thu Feb 17 15:10:13 2011	(r218772)
+++ head/sys/vm/vm_page.c	Thu Feb 17 15:36:29 2011	(r218773)
@@ -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_pad
 	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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102171536.p1HFaTf7015684>