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
This commit is contained in:
Alan Cox 2012-10-13 18:46:46 +00:00
parent d38ae94bce
commit 9af47af64a
3 changed files with 1 additions and 7 deletions

View File

@ -820,7 +820,6 @@ vm_object_page_clean(vm_object_t object, vm_ooffset_t start, vm_ooffset_t end,
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 object, vm_page_t p, int pagerflags,
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);

View File

@ -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 *msg)
{
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);

View File

@ -476,7 +476,6 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen,
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