From owner-svn-src-user@FreeBSD.ORG Fri Feb 15 16:05:19 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 00E9A9ED; Fri, 15 Feb 2013 16:05:18 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CFDAB6BB; Fri, 15 Feb 2013 16:05:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1FG5Ilf007766; Fri, 15 Feb 2013 16:05:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1FG5Igd007765; Fri, 15 Feb 2013 16:05:18 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302151605.r1FG5Igd007765@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Feb 2013 16:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246840 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 16:05:19 -0000 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 #include #include +#include #include #include #include -#include #include #include @@ -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; }