freebsd-skq/sys/compat/svr4
rwatson 57ca4583e7 Build on Jeff Roberson's linker-set based dynamic per-CPU allocator
(DPCPU), as suggested by Peter Wemm, and implement a new per-virtual
network stack memory allocator.  Modify vnet to use the allocator
instead of monolithic global container structures (vinet, ...).  This
change solves many binary compatibility problems associated with
VIMAGE, and restores ELF symbols for virtualized global variables.

Each virtualized global variable exists as a "reference copy", and also
once per virtual network stack.  Virtualized global variables are
tagged at compile-time, placing the in a special linker set, which is
loaded into a contiguous region of kernel memory.  Virtualized global
variables in the base kernel are linked as normal, but those in modules
are copied and relocated to a reserved portion of the kernel's vnet
region with the help of a the kernel linker.

Virtualized global variables exist in per-vnet memory set up when the
network stack instance is created, and are initialized statically from
the reference copy.  Run-time access occurs via an accessor macro, which
converts from the current vnet and requested symbol to a per-vnet
address.  When "options VIMAGE" is not compiled into the kernel, normal
global ELF symbols will be used instead and indirection is avoided.

This change restores static initialization for network stack global
variables, restores support for non-global symbols and types, eliminates
the need for many subsystem constructors, eliminates large per-subsystem
structures that caused many binary compatibility issues both for
monitoring applications (netstat) and kernel modules, removes the
per-function INIT_VNET_*() macros throughout the stack, eliminates the
need for vnet_symmap ksym(2) munging, and eliminates duplicate
definitions of virtualized globals under VIMAGE_GLOBALS.

Bump __FreeBSD_version and update UPDATING.

Portions submitted by:  bz
Reviewed by:            bz, zec
Discussed with:         gnn, jamie, jeff, jhb, julian, sam
Suggested by:           peter
Approved by:            re (kensmith)
2009-07-14 22:48:30 +00:00
..
imgact_svr4.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
Makefile Housekeeping. Update for maintainers who have handed in their commit bits 2006-07-01 10:51:55 +00:00
svr4_acl.h
svr4_dirent.h
svr4_errno.h
svr4_exec.h
svr4_fcntl.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
svr4_fcntl.h
svr4_filio.c Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
svr4_filio.h
svr4_fuser.h
svr4_hrt.h
svr4_ioctl.c de-register. 2009-05-29 05:58:46 +00:00
svr4_ioctl.h Burn TTY ioctl bridges in compat layers. 2009-05-08 20:06:37 +00:00
svr4_ipc.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
svr4_ipc.h
svr4_misc.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
svr4_mman.h
svr4_proto.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
svr4_resource.c de-register. 2009-05-29 05:58:46 +00:00
svr4_resource.h
svr4_siginfo.h
svr4_signal.c de-register. 2009-05-29 05:58:46 +00:00
svr4_signal.h
svr4_socket.c copyinstr(9) takes parameter 'len' as a size_t *, not int *. 2009-05-29 06:04:26 +00:00
svr4_socket.h Clean up the svr4 socket cache and streams code some to make it more easily 2006-07-21 20:40:13 +00:00
svr4_sockio.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
svr4_sockio.h
svr4_sockmod.h
svr4_stat.c There is an optimization in chmod(1), that makes it not to call chmod(2) 2009-07-08 15:23:18 +00:00
svr4_stat.h
svr4_statvfs.h
svr4_stream.c de-register. 2009-05-29 05:58:46 +00:00
svr4_stropts.h - Explicitly lock Giant to protect the fields in the svr4_strm structure 2006-07-28 16:56:17 +00:00
svr4_syscall.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
svr4_syscallnames.c Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
svr4_sysconfig.h Add new sysconfig bits, Fix the bogus numbering of the old bits. 2009-05-29 05:37:27 +00:00
svr4_sysent.c Regenerate generated syscall files following changes to struct sysent in 2009-06-01 16:14:38 +00:00
svr4_systeminfo.h
svr4_sysvec.c Implement new way of branding ELF binaries by looking to a 2009-03-13 16:40:51 +00:00
svr4_termios.c
svr4_termios.h
svr4_time.h
svr4_timod.h
svr4_types.h Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
svr4_ucontext.h
svr4_ulimit.h
svr4_ustat.h
svr4_util.h - Split out kern_accept(), kern_getpeername(), and kern_getsockname() for 2006-07-10 21:38:17 +00:00
svr4_utsname.h
svr4_wait.h
svr4.h
syscalls.conf - Remove unused sysvec variables from various syscalls.conf. 2006-08-15 17:25:55 +00:00
syscalls.master Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used to 2006-07-28 19:05:28 +00:00