diff options
author | alc <alc@FreeBSD.org> | 2012-04-21 18:26:16 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2012-04-21 18:26:16 +0000 |
commit | ad5c747d1de39d9fdd7096a2314b7cb2eecb3448 (patch) | |
tree | 8c23956fc14fc5e1ae1c9bb93a2af83964a76a8c /sys/vm/vm_page.c | |
parent | 3675431b54d7120daef53592065aedf6b0edf86d (diff) | |
download | FreeBSD-src-ad5c747d1de39d9fdd7096a2314b7cb2eecb3448.zip FreeBSD-src-ad5c747d1de39d9fdd7096a2314b7cb2eecb3448.tar.gz |
As documented in vm_page.h, updates to the vm_page's flags no longer
require the page queues lock.
MFC after: 1 week
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 65bb701..ee46503 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2155,13 +2155,10 @@ vm_page_unwire(vm_page_t m, int activate) if ((m->oflags & VPO_UNMANAGED) != 0 || m->object == NULL) return; - vm_page_lock_queues(); - if (activate) - vm_page_enqueue(PQ_ACTIVE, m); - else { + if (!activate) m->flags &= ~PG_WINATCFLS; - vm_page_enqueue(PQ_INACTIVE, m); - } + vm_page_lock_queues(); + vm_page_enqueue(activate ? PQ_ACTIVE : PQ_INACTIVE, m); vm_page_unlock_queues(); } } else @@ -2201,8 +2198,8 @@ _vm_page_deactivate(vm_page_t m, int athead) if ((queue = m->queue) == PQ_INACTIVE) return; if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { - vm_page_lock_queues(); m->flags &= ~PG_WINATCFLS; + vm_page_lock_queues(); if (queue != PQ_NONE) vm_page_queue_remove(queue, m); if (athead) |