Ben Gras [Mon, 1 Aug 2011 13:35:34 +0000 (15:35 +0200)]
kernel: invlpg facility
. only use for single-page invalidations initially
. shows tiny but statistically significant performance
improvement; will be more helpful in certain VM debug
modes
Ben Gras [Thu, 4 Aug 2011 23:52:03 +0000 (23:52 +0000)]
vm/ipc: only report signals when it matters to ipc
. ipc wants to know about processes that get
signals, so that it can break blocking ipc operations
. doing it for every single signal is wasteful
and causes the annoying 'no slot for signals' message
. this fix tells vm on a per-process basis it (ipc)
wants to be notified, i.e. only when it does any ipc calls
. move ipc config to separate config file while we're at it
Antoine Leca [Tue, 26 Jul 2011 11:49:20 +0000 (13:49 +0200)]
ash: don't rely on libc signal names
The bsd signal names are out-of-order compared to the minix ones.
I found out (the hard way) that the (MINIX-descending) ordered list of
signals in <sys/signal.h> does not match the (BSD-descending) ordered
list of signals in usr/src/lib/libc/nbsd_libc/gen/sig{name,list}.c
Beyond being unfortunate, it prevents the trap command of ash to handle
correctly a named signal; a funny test case is
#!/bin/sh
trap 'echo trapping signal BUS' BUS
trap 'echo trapping signal 10 (USR1)' 10
trap # show me what is currently trapped
As a quick workaround, I disabled the use of the libc-provided
sys_sig{name,list} arrays for ash, and reverted to the hand-made array
which is used by the less capable MINIX libc. It allowed me to use
pkgsrc.
Ben Gras [Tue, 26 Jul 2011 15:59:57 +0000 (17:59 +0200)]
add /etc/resolv.conf pointing to minix nonamed
. needed for netbsd libc dns resolution
. points to minix nonamed
. /etc/resolv.conf should have the real info
(written by netconf / dhcp client)
. nonamed should be phased out but will probably
be around for the 'old' libc
Ben Gras [Fri, 22 Jul 2011 10:55:04 +0000 (10:55 +0000)]
kernel: improve exception debug printing
. fold 2 exception-in-kernel cases (pagefault and rest)
into 1
. for exceptions that occur in kernel, don't just print
kernel stacktrace (typically that is just the exception
handler) but also the stacktrace of when the exception
happened
Ben Gras [Wed, 20 Jul 2011 13:44:59 +0000 (15:44 +0200)]
cleanup of libterminfo introduction
. don't install minix <termcap.h> as libterminfo
has its own (but still install it in /usr/include.ack)
. forget minix termcap functions in -lcompat_minix
. make commands use -lterminfo in netbsd libc compile mode
Ben Gras [Wed, 20 Jul 2011 12:51:58 +0000 (14:51 +0200)]
import netbsd sed
. speeds up mkdep (i.e. world builds) significantly
. have to keep minix /bin/sed for a while because previous
usr/etc/rc depends on it
. force mkdep to use /usr/bin/sed for speedup
Arun Thomas [Tue, 19 Jul 2011 13:26:25 +0000 (15:26 +0200)]
buildsystem: use dependall target
Improves cache locality by grouping together dependency generation
with building for each program instead of doing a whole-tree dep
generation phase followed by a whole-tree build phase
Ben Gras [Sat, 16 Jul 2011 01:11:10 +0000 (03:11 +0200)]
rename mmap() and munmap()
. it's a good extra interface to have but doesn't
meet standardised functionality
. applications (in pkgsrc) find it and expect
full functionality the minix mmap doesn't offter
. on the whole probably better to hide these functions
(mmap and friends) until they are grown up; the base system
can use the new minix_* names
Ben Gras [Fri, 15 Jul 2011 16:10:50 +0000 (18:10 +0200)]
rename mmap MAP_SHARED to MAP_IPC_SHARED
. MAP_SHARED was used to implement sysv shared memory
. used to signal shareable memory region to VM
. assumptions about this situation break when processes
use MAP_SHARED for its normal, standardised meaning
POSIX truncate specification says "Upon successful completion, if
the *file size is changed*, this function shall mark for update the
st_ctime and st_mtime fields of the file." This patch prevents
changing of the date fields when the size stays the same.
Ben Gras [Wed, 13 Jul 2011 21:59:07 +0000 (23:59 +0200)]
release.sh: jail install
. Feature to do a 'release' into a permanent
and usable FS hierarchy, usable with chroot
. Just like the temporary staging hierarchy really
. Useful to checking out and building the latest
version of minix from a host minix; to
(1) make an uptodate minix jail, and
(2) make a sterile, reproducible jail environment, and
(3) use as disposable environment in which moving /usr/pkg
is ok
(i.e. pkgsrc bulk builds)
Ben Gras [Wed, 13 Jul 2011 20:34:37 +0000 (22:34 +0200)]
generate sys_errlist without holes
. strerror() assumes this
. remove generated libminc/errlist.c
. errno's in <sys/errno.h> have to be in sorted order
. filtering out some errno.h in Makefile lets us use near-stock
errlist.awk
* VFS and installed MFSes must be in sync before and after this change *
Use struct stat from NetBSD. It requires adding new STAT, FSTAT and LSTAT
syscalls. Libc modification is both backward and forward compatible.
Also new struct stat uses modern field sizes to avoid ABI
incompatibility, when we update uid_t, gid_t and company.
Exceptions are ino_t and off_t in old libc (though paddings added).