svn commit: r195041 - user/kmacy/releng_7_2_fcs/sys/vm
Kip Macy
kmacy at FreeBSD.org
Fri Jun 26 06:38:50 UTC 2009
Author: kmacy
Date: Fri Jun 26 06:38:49 2009
New Revision: 195041
URL: http://svn.freebsd.org/changeset/base/195041
Log:
don't acquire global page queues lock in _vm_pageq_remove unless queue != PQ_NONE
Modified:
user/kmacy/releng_7_2_fcs/sys/vm/vm_page.c
Modified: user/kmacy/releng_7_2_fcs/sys/vm/vm_page.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/vm/vm_page.c Fri Jun 26 06:11:39 2009 (r195040)
+++ user/kmacy/releng_7_2_fcs/sys/vm/vm_page.c Fri Jun 26 06:38:49 2009 (r195041)
@@ -1259,9 +1259,9 @@ vm_page_requeue_locked(vm_page_t m)
int queue;
struct vpgqueues *vpq;
- mtx_assert(&vm_page_queue_mtx, MA_OWNED);
queue = VM_PAGE_GETQUEUE(m);
if (queue != PQ_NONE) {
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
vpq = &vm_page_queues[queue];
TAILQ_REMOVE(&vpq->pl, m, pageq);
TAILQ_INSERT_TAIL(&vpq->pl, m, pageq);
@@ -1290,18 +1290,17 @@ _vm_pageq_remove(vm_page_t m, int locked
int queue;
struct vpgqueues *pq;
- if (locked == 0)
- vm_page_lock_queues();
-
queue = VM_PAGE_GETQUEUE(m);
if (queue != PQ_NONE) {
+ if (locked == 0)
+ vm_page_lock_queues();
VM_PAGE_SETQUEUE2(m, PQ_NONE);
pq = &vm_page_queues[queue];
TAILQ_REMOVE(&pq->pl, m, pageq);
(*pq->cnt)--;
+ if (locked == 0)
+ vm_page_unlock_queues();
}
- if (locked == 0)
- vm_page_unlock_queues();
}
void
More information about the svn-src-user
mailing list