svn commit: r241512 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Sat Oct 13 18:46:47 UTC 2012
Author: alc
Date: Sat Oct 13 18:46:46 2012
New Revision: 241512
URL: http://svn.freebsd.org/changeset/base/241512
Log:
Eliminate the conditional for releasing the page queues lock in
vm_page_sleep(). vm_page_sleep() is no longer called with this lock
held.
Eliminate assertions that the page queues lock is NOT held. These
assertions won't translate well to having distinct locks on the active
and inactive page queues, and they really aren't that useful.
MFC after: 3 weeks
Modified:
head/sys/vm/vm_object.c
head/sys/vm/vm_page.c
head/sys/vm/vm_pageout.c
Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c Sat Oct 13 18:40:39 2012 (r241511)
+++ head/sys/vm/vm_object.c Sat Oct 13 18:46:46 2012 (r241512)
@@ -820,7 +820,6 @@ vm_object_page_clean(vm_object_t object,
int curgeneration, n, pagerflags;
boolean_t clearobjflags, eio, res;
- mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED);
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
KASSERT(object->type == OBJT_VNODE, ("Not a vnode object"));
if ((object->flags & OBJ_MIGHTBEDIRTY) == 0 ||
@@ -906,7 +905,6 @@ vm_object_page_collect_flush(vm_object_t
vm_page_t ma[vm_pageout_page_count], p_first, tp;
int count, i, mreq, runlen;
- mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED);
vm_page_lock_assert(p, MA_NOTOWNED);
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c Sat Oct 13 18:40:39 2012 (r241511)
+++ head/sys/vm/vm_page.c Sat Oct 13 18:46:46 2012 (r241512)
@@ -736,7 +736,7 @@ vm_page_readahead_finish(vm_page_t m)
/*
* vm_page_sleep:
*
- * Sleep and release the page and page queues locks.
+ * Sleep and release the page lock.
*
* The object containing the given page must be locked.
*/
@@ -745,8 +745,6 @@ vm_page_sleep(vm_page_t m, const char *m
{
VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
- if (mtx_owned(&vm_page_queue_mtx))
- vm_page_unlock_queues();
if (mtx_owned(vm_page_lockptr(m)))
vm_page_unlock(m);
@@ -2933,7 +2931,6 @@ vm_page_cowfault(vm_page_t m)
vm_object_t object;
vm_pindex_t pindex;
- mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED);
vm_page_lock_assert(m, MA_OWNED);
object = m->object;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c Sat Oct 13 18:40:39 2012 (r241511)
+++ head/sys/vm/vm_pageout.c Sat Oct 13 18:46:46 2012 (r241512)
@@ -476,7 +476,6 @@ vm_pageout_flush(vm_page_t *mc, int coun
int i, runlen;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
- mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED);
/*
* Initiate I/O. Bump the vm_page_t->busy counter and
More information about the svn-src-head
mailing list