diff options
author | alc <alc@FreeBSD.org> | 2010-04-27 05:35:35 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-04-27 05:35:35 +0000 |
commit | 0ee54d44efd2c656c466198d0afa88cd0357a0eb (patch) | |
tree | 214e519ddc89409215cfbc434db38397ab7945f9 /sys/i386/xen/pmap.c | |
parent | 1b05a112d4cbea67db29b7df286106b4cde94e93 (diff) | |
download | FreeBSD-src-0ee54d44efd2c656c466198d0afa88cd0357a0eb.zip FreeBSD-src-0ee54d44efd2c656c466198d0afa88cd0357a0eb.tar.gz |
MFi386 r207205
Clearing a page table entry's accessed bit (PG_A) and setting the
page's PG_REFERENCED flag in pmap_protect() can't really be justified,
so don't do it.
Diffstat (limited to 'sys/i386/xen/pmap.c')
-rw-r--r-- | sys/i386/xen/pmap.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 40e36be..18619c3 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -2600,22 +2600,16 @@ retry: obits = pbits = *pte; if ((pbits & PG_V) == 0) continue; - if (pbits & PG_MANAGED) { - m = NULL; - if (pbits & PG_A) { - m = PHYS_TO_VM_PAGE(xpmap_mtop(pbits) & PG_FRAME); - vm_page_flag_set(m, PG_REFERENCED); - pbits &= ~PG_A; - } - if ((pbits & PG_M) != 0) { - if (m == NULL) - m = PHYS_TO_VM_PAGE(xpmap_mtop(pbits) & PG_FRAME); + + if ((prot & VM_PROT_WRITE) == 0) { + if ((pbits & (PG_MANAGED | PG_M | PG_RW)) == + (PG_MANAGED | PG_M | PG_RW)) { + m = PHYS_TO_VM_PAGE(xpmap_mtop(pbits) & + PG_FRAME); vm_page_dirty(m); } - } - - if ((prot & VM_PROT_WRITE) == 0) pbits &= ~(PG_RW | PG_M); + } #ifdef PAE if ((prot & VM_PROT_EXECUTE) == 0) pbits |= pg_nx; |