From owner-svn-src-head@freebsd.org Fri Nov 24 14:23:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C785FDE78F9; Fri, 24 Nov 2017 14:23:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 8DBDA76C66; Fri, 24 Nov 2017 14:23:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id C0555D640DD; Sat, 25 Nov 2017 01:23:23 +1100 (AEDT) Date: Sat, 25 Nov 2017 01:23:23 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326073 - head/usr.bin/systat In-Reply-To: <20171124132453.GY2272@kib.kiev.ua> Message-ID: <20171125010218.U1794@besplex.bde.org> References: <201711211955.vALJtWhg047906@repo.freebsd.org> <20171122071838.R1172@besplex.bde.org> <20171122103917.GS2272@kib.kiev.ua> <20171123021646.M1933@besplex.bde.org> <20171122220538.GT2272@kib.kiev.ua> <20171123224032.A992@besplex.bde.org> <20171123151849.GU2272@kib.kiev.ua> <20171124184535.E980@besplex.bde.org> <20171124105720.GW2272@kib.kiev.ua> <20171124225011.V1289@besplex.bde.org> <20171124132453.GY2272@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=h7illfbrFq0Lnr7M8XIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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, 24 Nov 2017 14:23:31 -0000 On Fri, 24 Nov 2017, Konstantin Belousov wrote: > On Sat, Nov 25, 2017 at 12:14:10AM +1100, Bruce Evans wrote: >* ... >> Hmm, I couldn't find any arch with even a compile-time variable PAGE_SIZE. >> It is currently just unportable in theory to use hard-coded PAGE_SIZE or >> macros that use it. > sparc64 uses 8K, Itanium had compile-time variable page size supported by > hardware. I checked ia64, but couldn't find it before. Now I found it. The ifdef is on LOG2_PAGE_SIZE (default 13 for 8K-pages). This gives a compile-time constant for PAGE_SIZE. ogetpagesize() and the sysctl HW_PAGESIZE return this constant. So it may vary with the kernel in userland, and userland would be broken if it used PAGE_SIZE from the host include files. LOG2_PAGE_SIZE was a supported global option, but this doesn't work in modules. No options work in modules, but this one is more fundamental than most. So it was probably necessary to compile all modules after editing the default in the source file. opt_global.h is even more unusable in userland, but editing the source file works for userland too. Bruce