Prevent the loss of a PG_M bit through an SMP race in pmap_ts_referenced().

This commit is contained in:
Alan Cox 2004-06-13 21:59:42 +00:00
parent 63b3701deb
commit 7881f95056
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130433
2 changed files with 2 additions and 2 deletions

View File

@ -2669,7 +2669,7 @@ pmap_ts_referenced(vm_page_t m)
pte = pmap_pte(pv->pv_pmap, pv->pv_va);
if (pte && ((v = pte_load(pte)) & PG_A) != 0) {
pte_store(pte, v & ~PG_A);
atomic_clear_long(pte, PG_A);
pmap_invalidate_page(pv->pv_pmap, pv->pv_va);
rtval++;

View File

@ -2777,7 +2777,7 @@ pmap_ts_referenced(vm_page_t m)
pte = pmap_pte_quick(pv->pv_pmap, pv->pv_va);
if (pte && ((v = pte_load(pte)) & PG_A) != 0) {
pte_store(pte, v & ~PG_A);
atomic_clear_int((u_int *)pte, PG_A);
pmap_invalidate_page(pv->pv_pmap, pv->pv_va);
rtval++;