Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Sep 2011 15:13:24 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225514 - in user/attilio/vmcontention/sys: ia64/ia64 powerpc/booke sparc64/sparc64
Message-ID:  <201109121513.p8CFDOKi031336@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Sep 12 15:13:23 2011
New Revision: 225514
URL: http://svn.freebsd.org/changeset/base/225514

Log:
  After the dirty updates are atomic, there is no need to lock
  page queues only to guarantee proper dirty updates.
  
  Submitted by:	alc

Modified:
  user/attilio/vmcontention/sys/ia64/ia64/pmap.c
  user/attilio/vmcontention/sys/powerpc/booke/pmap.c
  user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c

Modified: user/attilio/vmcontention/sys/ia64/ia64/pmap.c
==============================================================================
--- user/attilio/vmcontention/sys/ia64/ia64/pmap.c	Mon Sep 12 15:11:34 2011	(r225513)
+++ user/attilio/vmcontention/sys/ia64/ia64/pmap.c	Mon Sep 12 15:13:23 2011	(r225514)
@@ -1486,7 +1486,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 	if ((sva & PAGE_MASK) || (eva & PAGE_MASK))
 		panic("pmap_protect: unaligned addresses");
 
-	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 	oldpmap = pmap_switch(pmap);
 	for ( ; sva < eva; sva += PAGE_SIZE) {
@@ -1514,7 +1513,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 		pmap_pte_prot(pmap, pte, prot);
 		pmap_invalidate_page(sva);
 	}
-	vm_page_unlock_queues();
 	pmap_switch(oldpmap);
 	PMAP_UNLOCK(pmap);
 }

Modified: user/attilio/vmcontention/sys/powerpc/booke/pmap.c
==============================================================================
--- user/attilio/vmcontention/sys/powerpc/booke/pmap.c	Mon Sep 12 15:11:34 2011	(r225513)
+++ user/attilio/vmcontention/sys/powerpc/booke/pmap.c	Mon Sep 12 15:13:23 2011	(r225514)
@@ -1918,7 +1918,6 @@ mmu_booke_protect(mmu_t mmu, pmap_t pmap
 	if (prot & VM_PROT_WRITE)
 		return;
 
-	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 	for (va = sva; va < eva; va += PAGE_SIZE) {
 		if ((pte = pte_find(mmu, pmap, va)) != NULL) {
@@ -1941,7 +1940,6 @@ mmu_booke_protect(mmu_t mmu, pmap_t pmap
 		}
 	}
 	PMAP_UNLOCK(pmap);
-	vm_page_unlock_queues();
 }
 
 /*

Modified: user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c
==============================================================================
--- user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c	Mon Sep 12 15:11:34 2011	(r225513)
+++ user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c	Mon Sep 12 15:13:23 2011	(r225514)
@@ -1425,6 +1425,7 @@ pmap_protect_tte(struct pmap *pm, struct
 	u_long data;
 	vm_page_t m;
 
+	PMAP_LOCK_ASSERT(pm, MA_OWNED);
 	data = atomic_clear_long(&tp->tte_data, TD_SW | TD_W);
 	if ((data & (TD_PV | TD_W)) == (TD_PV | TD_W)) {
 		m = PHYS_TO_VM_PAGE(TD_PA(data));
@@ -1453,7 +1454,6 @@ pmap_protect(pmap_t pm, vm_offset_t sva,
 	if (prot & VM_PROT_WRITE)
 		return;
 
-	vm_page_lock_queues();
 	PMAP_LOCK(pm);
 	if (eva - sva > PMAP_TSB_THRESH) {
 		tsb_foreach(pm, NULL, sva, eva, pmap_protect_tte);
@@ -1465,7 +1465,6 @@ pmap_protect(pmap_t pm, vm_offset_t sva,
 		tlb_range_demap(pm, sva, eva - 1);
 	}
 	PMAP_UNLOCK(pm);
-	vm_page_unlock_queues();
 }
 
 /*



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