diff options
author | alc <alc@FreeBSD.org> | 2002-08-02 04:40:10 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-08-02 04:40:10 +0000 |
commit | a15cfdccfbf5cab416e0549067bea309ff990d9b (patch) | |
tree | 4711e4d3c2f1e2d8f7713fe24166b67ede07eecf /sys/alpha | |
parent | 9a9424f83ac186642cecee52408f46f82a2cea90 (diff) | |
download | FreeBSD-src-a15cfdccfbf5cab416e0549067bea309ff990d9b.zip FreeBSD-src-a15cfdccfbf5cab416e0549067bea309ff990d9b.tar.gz |
o Lock page queue accesses by vm_page_deactivate().
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/pmap.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index 6c825c9..1f7c036 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -2312,17 +2312,21 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, cnt.v_free_count < cnt.v_free_reserved) { break; } + vm_page_lock_queues(); if (((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) && (p->busy == 0) && (p->flags & (PG_BUSY | PG_FICTITIOUS)) == 0) { if ((p->queue - p->pc) == PQ_CACHE) vm_page_deactivate(p); vm_page_busy(p); + vm_page_unlock_queues(); mpte = pmap_enter_quick(pmap, addr + alpha_ptob(tmpidx), p, mpte); + vm_page_lock_queues(); vm_page_flag_set(p, PG_MAPPED); vm_page_wakeup(p); } + vm_page_unlock_queues(); objpgs -= 1; } } else { @@ -2339,18 +2343,23 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, break; } p = vm_page_lookup(object, tmpidx + pindex); - if (p && - ((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) && + if (p == NULL) + continue; + vm_page_lock_queues(); + if ((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL && (p->busy == 0) && (p->flags & (PG_BUSY | PG_FICTITIOUS)) == 0) { if ((p->queue - p->pc) == PQ_CACHE) vm_page_deactivate(p); vm_page_busy(p); + vm_page_unlock_queues(); mpte = pmap_enter_quick(pmap, addr + alpha_ptob(tmpidx), p, mpte); + vm_page_lock_queues(); vm_page_flag_set(p, PG_MAPPED); vm_page_wakeup(p); } + vm_page_unlock_queues(); } } return; @@ -2434,7 +2443,7 @@ pmap_prefault(pmap, addra, entry) */ if (m == NULL) break; - + vm_page_lock_queues(); if (((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) && (m->busy == 0) && (m->flags & (PG_BUSY | PG_FICTITIOUS)) == 0) { @@ -2443,10 +2452,13 @@ pmap_prefault(pmap, addra, entry) vm_page_deactivate(m); } vm_page_busy(m); + vm_page_unlock_queues(); mpte = pmap_enter_quick(pmap, addr, m, mpte); + vm_page_lock_queues(); vm_page_flag_set(m, PG_MAPPED); vm_page_wakeup(m); } + vm_page_unlock_queues(); } } |