From owner-svn-src-head@FreeBSD.ORG Fri Aug 9 22:18:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B347F99C; Fri, 9 Aug 2013 22:18:49 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 802C42619; Fri, 9 Aug 2013 22:18:48 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id r79Chw9K015821; Fri, 9 Aug 2013 17:18:47 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 1e41r812ma-1; Fri, 09 Aug 2013 17:18:47 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from [10.104.199.154] (unknown [131.107.165.33]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 4CBCC460110; Fri, 9 Aug 2013 17:18:47 -0500 (CDT) Subject: Re: svn commit: r254164 - head/sys/arm/include Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Alan Cox In-Reply-To: <201308092153.r79Lr2BY043441@svn.freebsd.org> Date: Fri, 9 Aug 2013 15:18:40 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4390BE71-FE5E-43DE-9687-8CA395092450@rice.edu> References: <201308092153.r79Lr2BY043441@svn.freebsd.org> To: Olivier Houchard X-Mailer: Apple Mail (2.1085) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 22:18:49 -0000 On Aug 9, 2013, at 2:53 PM, Olivier Houchard wrote: > Author: cognet > Date: Fri Aug 9 21:53:02 2013 > New Revision: 254164 > URL: http://svnweb.freebsd.org/changeset/base/254164 >=20 > Log: > Make sure vm_kmem_size is aligned on a page boundary, since that's = what vmem > expects. >=20 > Modified: > head/sys/arm/include/vmparam.h >=20 > Modified: head/sys/arm/include/vmparam.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/include/vmparam.h Fri Aug 9 21:14:55 2013 = (r254163) > +++ head/sys/arm/include/vmparam.h Fri Aug 9 21:53:02 2013 = (r254164) > @@ -165,8 +165,8 @@ > * Ceiling on the size of the kmem submap: 40% of the kernel map. > */ > #ifndef VM_KMEM_SIZE_MAX > -#define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \ > - VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) > +#define VM_KMEM_SIZE_MAX (((vm_max_kernel_address - \ > + VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) &~ PAGE_MASK) > #endif >=20 > #ifdef ARM_USE_SMALL_ALLOC >=20 I would suggest a different approach. Add a round_page() to kmeminit() = after the TUNABLE_ULONG_FETCH("vm.kmem_size", ...). This alternate = approach has two virtues. First, it will also handle a = /boot/loader.conf value that isn't page aligned. Second, it will = simultaneously address the same problem on other architectures. Thanks, Alan