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
This commit is contained in:
parent
f03138a253
commit
e420c0cab7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192628
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user