Date: Sat, 25 Nov 2017 01:23:23 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Konstantin Belousov <kostikbel@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326073 - head/usr.bin/systat Message-ID: <20171125010218.U1794@besplex.bde.org> In-Reply-To: <20171124132453.GY2272@kib.kiev.ua> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171125010218.U1794>