diff options
author | alc <alc@FreeBSD.org> | 2009-05-23 07:58:56 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2009-05-23 07:58:56 +0000 |
commit | 0aebbd8ad9aed8fa4608da264a9e626d5bc2ecc6 (patch) | |
tree | 1c8e6d1f19d81bdf3fc6fb5a95e4662b170de397 /sys/mips | |
parent | 75f2d8c228d77fe36081e5ec716311431fd62b0b (diff) | |
download | FreeBSD-src-0aebbd8ad9aed8fa4608da264a9e626d5bc2ecc6.zip FreeBSD-src-0aebbd8ad9aed8fa4608da264a9e626d5bc2ecc6.tar.gz |
Preset the modified bit in the PTE when pmap_enter() is called during a
write fault or while wiring a mapping that must support write access.
In general, this change should reduce the number of traps that occur for
the purpose of setting the modified bit. More specifically, this change
should prevent traps while holding locks in a sysctl handler. See
kern/kern_sysctl.c revisions 1.168 and 1.195 (svn r192160) for further
details.
Tested by: gonzo
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/pmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 115825c..2188c36 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -1849,6 +1849,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t fault_type, vm_page_t m, vm_pr pmap->pm_stats.wired_count++; validate: + if ((access & VM_PROT_WRITE) != 0) + m->md.pv_flags |= PV_TABLE_MOD | PV_TABLE_REF; rw = init_pte_prot(va, m, prot); #ifdef PMAP_DEBUG |