svn commit: r215973 - in head/sys: mips/mips vm

Jayachandran C. jchandra at FreeBSD.org
Sun Nov 28 05:51:31 UTC 2010


Author: jchandra
Date: Sun Nov 28 05:51:31 2010
New Revision: 215973
URL: http://svn.freebsd.org/changeset/base/215973

Log:
  Fix issue noted by alc while reviewing r215938:
  The current implementation of vm_page_alloc_freelist() does not handle
  order > 0 correctly. Remove order parameter to the function and use it
  only for order 0 pages.
  
  Submitted by:	alc

Modified:
  head/sys/mips/mips/pmap.c
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Sun Nov 28 04:55:31 2010	(r215972)
+++ head/sys/mips/mips/pmap.c	Sun Nov 28 05:51:31 2010	(r215973)
@@ -1077,7 +1077,7 @@ pmap_alloc_pte_page(unsigned int index, 
 {
 	vm_page_t m;
 
-	m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, 0, req);
+	m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, req);
 	if (m == NULL)
 		return (NULL);
 

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Sun Nov 28 04:55:31 2010	(r215972)
+++ head/sys/vm/vm_page.c	Sun Nov 28 05:51:31 2010	(r215973)
@@ -1409,12 +1409,12 @@ vm_page_alloc_init(vm_page_t m)
 /*
  * 	vm_page_alloc_freelist:
  * 
- *	Allocate a page from the specified freelist with specified order.
+ *	Allocate a page from the specified freelist.
  *	Only the ALLOC_CLASS values in req are honored, other request flags
  *	are ignored.
  */
 vm_page_t
-vm_page_alloc_freelist(int flind, int order, int req)
+vm_page_alloc_freelist(int flind, int req)
 {
 	struct vnode *drop;
 	vm_page_t m;
@@ -1431,7 +1431,7 @@ vm_page_alloc_freelist(int flind, int or
 	    cnt.v_free_count + cnt.v_cache_count > cnt.v_interrupt_free_min) ||
 	    (page_req == VM_ALLOC_INTERRUPT &&
 	    cnt.v_free_count + cnt.v_cache_count > 0)) {
-		m = vm_phys_alloc_freelist_pages(flind, VM_FREEPOOL_DIRECT, order);
+		m = vm_phys_alloc_freelist_pages(flind, VM_FREEPOOL_DIRECT, 0);
 	}
 	if (m == NULL) {
 		mtx_unlock(&vm_page_queue_free_mtx);

Modified: head/sys/vm/vm_page.h
==============================================================================
--- head/sys/vm/vm_page.h	Sun Nov 28 04:55:31 2010	(r215972)
+++ head/sys/vm/vm_page.h	Sun Nov 28 05:51:31 2010	(r215973)
@@ -340,7 +340,7 @@ void vm_pageq_remove(vm_page_t m);
 
 void vm_page_activate (vm_page_t);
 vm_page_t vm_page_alloc (vm_object_t, vm_pindex_t, int);
-vm_page_t vm_page_alloc_freelist(int, int, int);
+vm_page_t vm_page_alloc_freelist(int, int);
 struct vnode *vm_page_alloc_init(vm_page_t);
 vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int);
 void vm_page_cache(vm_page_t);


More information about the svn-src-head mailing list