svn commit: r217477 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Sun Jan 16 17:33:34 UTC 2011
Author: alc
Date: Sun Jan 16 17:33:34 2011
New Revision: 217477
URL: http://svn.freebsd.org/changeset/base/217477
Log:
Clean up the start of vm_page_alloc(). In particular, eliminate an
assertion that is no longer required. Long ago, calls to vm_page_alloc()
from an interrupt handler had to specify VM_ALLOC_INTERRUPT so that
vm_page_alloc() would not attempt to reclaim a PQ_CACHE page from another vm
object. Today, with the synchronization on a vm object's collection of
PQ_CACHE pages, this is no longer an issue. In fact, VM_ALLOC_INTERRUPT now
reclaims PQ_CACHE pages just like VM_ALLOC_{NORMAL,SYSTEM}.
MFC after: 3 weeks
Modified:
head/sys/vm/vm_page.c
Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c Sun Jan 16 14:37:48 2011 (r217476)
+++ head/sys/vm/vm_page.c Sun Jan 16 17:33:34 2011 (r217477)
@@ -1214,23 +1214,19 @@ vm_page_alloc(vm_object_t object, vm_pin
vm_page_t m;
int flags, page_req;
- page_req = req & VM_ALLOC_CLASS_MASK;
- KASSERT(curthread->td_intr_nesting_level == 0 ||
- page_req == VM_ALLOC_INTERRUPT,
- ("vm_page_alloc(NORMAL|SYSTEM) in interrupt context"));
-
if ((req & VM_ALLOC_NOOBJ) == 0) {
KASSERT(object != NULL,
("vm_page_alloc: NULL object."));
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
}
+ page_req = req & VM_ALLOC_CLASS_MASK;
+
/*
* The pager is allowed to eat deeper into the free page list.
*/
- if ((curproc == pageproc) && (page_req != VM_ALLOC_INTERRUPT)) {
+ if ((curproc == pageproc) && (page_req != VM_ALLOC_INTERRUPT))
page_req = VM_ALLOC_SYSTEM;
- };
mtx_lock(&vm_page_queue_free_mtx);
if (cnt.v_free_count + cnt.v_cache_count > cnt.v_free_reserved ||
More information about the svn-src-all
mailing list