svn commit: r321590 - projects/numa2/sys/vm

Mark Johnston markj at FreeBSD.org
Wed Jul 26 22:32:58 UTC 2017


Author: markj
Date: Wed Jul 26 22:32:57 2017
New Revision: 321590
URL: https://svnweb.freebsd.org/changeset/base/321590

Log:
  Let vm_page_alloc_domain() return NULL even when v_free_count is large.
  
  The selected domain may be exhausted even when plenty of free pages are
  available. Until we have a policy for handling local page shortages, just
  return NULL to signal that an allocation from a different domain should
  be attempted.

Modified:
  projects/numa2/sys/vm/vm_page.c

Modified: projects/numa2/sys/vm/vm_page.c
==============================================================================
--- projects/numa2/sys/vm/vm_page.c	Wed Jul 26 22:04:23 2017	(r321589)
+++ projects/numa2/sys/vm/vm_page.c	Wed Jul 26 22:32:57 2017	(r321590)
@@ -1636,10 +1636,11 @@ vm_page_alloc_domain(vm_object_t object, vm_pindex_t p
 		return (NULL);
 	}
 
-	/*
-	 *  At this point we had better have found a good page.
-	 */
-	KASSERT(m != NULL, ("vm_page_alloc: missing page"));
+	if (m == NULL) {
+		/* XXX */
+		mtx_unlock(&vm_page_queue_free_mtx);
+		return (NULL);
+	}
 	vm_phys_freecnt_adj(m, -1);
 	mtx_unlock(&vm_page_queue_free_mtx);
 	vm_page_alloc_check(m);


More information about the svn-src-projects mailing list