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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"