svn commit: r246840 - user/attilio/vmc-playground/sys/vm

Attilio Rao attilio at FreeBSD.org
Fri Feb 15 16:05:19 UTC 2013


Author: attilio
Date: Fri Feb 15 16:05:18 2013
New Revision: 246840
URL: http://svnweb.freebsd.org/changeset/base/246840

Log:
  On arches with VM_PHYSSEG_DENSE  the vm_page_array is larger than
  the actual number of vm_page_t that will be derived, so v_page_count
  should be used appropriately.
  
  Besides that, add a panic condition in case UMA fails to properly
  restrict the area in a way to keep all the desired objects.
  
  Sponsored by:	EMC / Isilon storage division
  Reported by:	alc

Modified:
  user/attilio/vmc-playground/sys/vm/vm_radix.c

Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c
==============================================================================
--- user/attilio/vmc-playground/sys/vm/vm_radix.c	Fri Feb 15 15:34:19 2013	(r246839)
+++ user/attilio/vmc-playground/sys/vm/vm_radix.c	Fri Feb 15 16:05:18 2013	(r246840)
@@ -50,11 +50,11 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
+#include <sys/vmmeter.h>
 
 #include <vm/uma.h>
 #include <vm/vm.h>
 #include <vm/vm_param.h>
-#include <vm/vm_extern.h>
 #include <vm/vm_page.h>
 #include <vm/vm_radix.h>
 
@@ -383,7 +383,9 @@ vm_radix_init(void *arg __unused)
 	    NULL,
 #endif
 	    NULL, NULL, VM_RADIX_PAD, UMA_ZONE_VM | UMA_ZONE_NOFREE);
-	nitems = uma_zone_set_max(vm_radix_node_zone, vm_page_array_size);
+	nitems = uma_zone_set_max(vm_radix_node_zone, cnt.v_page_count);
+	if (nitems < cnt.v_page_count)
+		panic("%s: unexpected requested number of items", __func__);
 	uma_prealloc(vm_radix_node_zone, nitems);
 	boot_cache_cnt = VM_RADIX_BOOT_CACHE + 1;
 }


More information about the svn-src-user mailing list