From owner-svn-src-all@FreeBSD.ORG Sun Oct 27 14:03:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0F6A12E2; Sun, 27 Oct 2013 14:03:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F138F2997; Sun, 27 Oct 2013 14:03:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9RE3ppc089087; Sun, 27 Oct 2013 14:03:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9RE3p0J089086; Sun, 27 Oct 2013 14:03:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201310271403.r9RE3p0J089086@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 27 Oct 2013 14:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257209 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Oct 2013 14:03:52 -0000 Author: nwhitehorn Date: Sun Oct 27 14:03:51 2013 New Revision: 257209 URL: http://svnweb.freebsd.org/changeset/base/257209 Log: Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC. Requested by: alc MFC after: 1 month Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Sun Oct 27 10:51:34 2013 (r257208) +++ head/sys/powerpc/include/vmparam.h Sun Oct 27 14:03:51 2013 (r257209) @@ -112,6 +112,7 @@ #define VM_MIN_KERNEL_ADDRESS KERNBASE #define VM_MAX_KERNEL_ADDRESS 0xf8000000 +#define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS #endif /* AIM/E500 */ @@ -175,14 +176,21 @@ struct pmap_physseg { #define VM_KMEM_SIZE (12 * 1024 * 1024) #endif -#ifdef __powerpc64__ +/* + * How many physical pages per KVA page allocated. + * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) + * is the total KVA space allocated for kmem_map. + */ #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (3) #endif +/* + * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + */ #ifndef VM_KMEM_SIZE_MAX -#define VM_KMEM_SIZE_MAX 0x1c0000000 /* 7 GB */ -#endif +#define VM_KMEM_SIZE_MAX ((VM_MAX_SAFE_KERNEL_ADDRESS - \ + VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) #endif #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */