svn commit: r206884 - user/kmacy/head_page_lock_2/sys/amd64/amd64
Kip Macy
kmacy at FreeBSD.org
Tue Apr 20 03:20:20 UTC 2010
Author: kmacy
Date: Tue Apr 20 03:20:20 2010
New Revision: 206884
URL: http://svn.freebsd.org/changeset/base/206884
Log:
in pmap_protect only call tryrelock if the page is managed and either the accessed or modified bit is set
Modified:
user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c
Modified: user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c
==============================================================================
--- user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Tue Apr 20 03:02:54 2010 (r206883)
+++ user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Tue Apr 20 03:20:20 2010 (r206884)
@@ -3317,21 +3317,18 @@ retry:
obits = pbits = *pte;
if ((pbits & PG_V) == 0)
continue;
- if (pbits & PG_MANAGED) {
- m = NULL;
+ if ((pbits & PG_MANAGED) &&
+ (pbits & (PG_M | PG_A))) {
if (pa_tryrelock(pmap, pbits & PG_FRAME, &pa))
goto restart;
+
+ m = PHYS_TO_VM_PAGE(pbits & PG_FRAME);
if (pbits & PG_A) {
- m = PHYS_TO_VM_PAGE(pbits & PG_FRAME);
vm_page_flag_set(m, PG_REFERENCED);
pbits &= ~PG_A;
}
- if ((pbits & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
- if (m == NULL)
- m = PHYS_TO_VM_PAGE(pbits &
- PG_FRAME);
+ if ((pbits & (PG_M | PG_RW)) == (PG_M | PG_RW))
vm_page_dirty(m);
- }
}
if ((prot & VM_PROT_WRITE) == 0)
More information about the svn-src-user
mailing list