freebsd-dev/sys/kern
Peter Wemm a2a1c95c10 The biggie: Get rid of the UPAGES from the top of the per-process address
space. (!)

Have each process use the kernel stack and pcb in the kvm space.  Since
the stacks are at a different address, we cannot copy the stack at fork()
and allow the child to return up through the function call tree to return
to user mode - create a new execution context and have the new process
begin executing from cpu_switch() and go to user mode directly.
In theory this should speed up fork a bit.

Context switch the tss_esp0 pointer in the common tss.  This is a lot
simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer
to each process's tss since the esp0 pointer is a 32 bit pointer, and the
sd_base setting is split into three different bit sections at non-aligned
boundaries and requires a lot of twiddling to reset.

The 8K of memory at the top of the process space is now empty, and unmapped
(and unmappable, it's higher than VM_MAXUSER_ADDRESS).

Simplity the pmap code to manage process contexts, we no longer have to
double map the UPAGES, this simplifies and should measuably speed up fork().

The following parts came from John Dyson:

Set PG_G on the UPAGES that are now in kernel context, and invalidate
them when swapping them out.

Move the upages object (upobj) from the vmspace to the proc structure.

Now that the UPAGES (pcb and kernel stack) are out of user space, make
rfork(..RFMEM..) do what was intended by sharing the vmspace
entirely via reference counting rather than simply inheriting the mappings.
1997-04-07 07:16:06 +00:00
..
imgact_aout.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
imgact_elf.c Use OID_AUTO instead of magic number for old sysctl debug.elf_trace. The 1997-04-01 10:41:48 +00:00
imgact_gzip.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
imgact_shell.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
inflate.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
init_main.c The biggie: Get rid of the UPAGES from the top of the per-process address 1997-04-07 07:16:06 +00:00
init_sysent.c Regenerate (added issetugid) 1997-03-31 14:55:05 +00:00
init_sysvec.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_acct.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
kern_clock.c Restore Bruce's original comment. It seems that "iff" = if and only if, 1997-03-22 20:34:21 +00:00
kern_conf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_descrip.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_exec.c Killed unnecessary vp == NULL check after namei. 1997-04-04 09:06:20 +00:00
kern_exit.c The biggie: Get rid of the UPAGES from the top of the per-process address 1997-04-07 07:16:06 +00:00
kern_fork.c The biggie: Get rid of the UPAGES from the top of the per-process address 1997-04-07 07:16:06 +00:00
kern_ktrace.c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined. 1997-03-23 03:37:54 +00:00
kern_lkm.c Make MOD_* macros almost consistent: 1997-04-06 11:14:13 +00:00
kern_lock.c Fixed commented-out Lite2 sysctl debug.lockpausetime. 1997-04-01 10:18:51 +00:00
kern_lockf.c Use OID_AUTO instead of a magic number for Lite2 sysctl debug.lockf_debug. 1997-04-01 10:30:06 +00:00
kern_malloc.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_mib.c Attach vfs_sysctl() one level lower so that only the levels below 1997-03-04 18:31:56 +00:00
kern_ntptime.c Update our kernel ntp code to the latest from David Mills. The main change 1996-12-30 18:26:28 +00:00
kern_opt.c Added a copyright and restored order. 1997-02-28 10:14:24 +00:00
kern_physio.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_proc.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
kern_prot.c Don't incorrectly set P_SUGID in setre[ug]id() for no reason, as noticed 1997-04-02 17:05:49 +00:00
kern_random.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_resource.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_shutdown.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_sig.c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined. 1997-03-23 03:37:54 +00:00
kern_subr.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_synch.c Wrapped mi_switch() with splstatclock()/splx(). This fixes excessive 1997-02-27 18:03:48 +00:00
kern_sysctl.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
kern_tc.c Restore Bruce's original comment. It seems that "iff" = if and only if, 1997-03-22 20:34:21 +00:00
kern_time.c Removed volatile' from declaration of time', and removed the resulting 1997-03-22 08:03:51 +00:00
kern_timeout.c Restore Bruce's original comment. It seems that "iff" = if and only if, 1997-03-22 20:34:21 +00:00
kern_xxx.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
Make.tags.inc Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
Makefile Remove bogus architectures to allow make tags to work. 1996-03-31 18:53:43 +00:00
makesyscalls.sh Make sure we touch all the temporary files at startup, because we assume 1997-03-29 11:11:18 +00:00
md5c.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_autoconf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_clist.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
subr_disklabel.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_diskmbr.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_diskslice.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
subr_dkbad.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_log.c Don't include <sys/ioctl.h> in the kernel. Stage 4: include 1997-03-24 11:52:29 +00:00
subr_param.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_prf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_prof.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_rlist.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
subr_trap.c The biggie: Get rid of the UPAGES from the top of the per-process address 1997-04-07 07:16:06 +00:00
subr_xxx.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sys_generic.c Don't include <sys/ioctl.h> in the kernel. Stage 4: include 1997-03-24 11:52:29 +00:00
sys_pipe.c Don't include <sys/ioctl.h> in the kernel. Stage 4: include 1997-03-24 11:52:29 +00:00
sys_process.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sys_socket.c Don't include <sys/ioctl.h> in the kernel. Stage 4: include 1997-03-24 11:52:29 +00:00
syscalls.c Regenerate (added issetugid) 1997-03-31 14:55:05 +00:00
syscalls.master issetugid is now implemented rather than reserved 1997-03-31 14:52:50 +00:00
sysv_ipc.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sysv_msg.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sysv_sem.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
sysv_shm.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_compat.c Don't include <sys/ioctl.h> in the kernel. Stage 5: include 1997-03-24 12:03:06 +00:00
tty_conf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_cons.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_pty.c Don't include <sys/ioctl.h> in the kernel. Stage 5: include 1997-03-24 12:03:06 +00:00
tty_snoop.c Don't include <sys/ioctl.h> in the kernel. Stage 3: include 1997-03-24 11:37:53 +00:00
tty_subr.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
tty_tb.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tty_tty.c Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include 1997-03-24 11:25:10 +00:00
tty.c Don't include <sys/ioctl.h> in the kernel. Stage 5: include 1997-03-24 12:03:06 +00:00
uipc_domain.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
uipc_mbuf.c Create a new branch of the kernel MIB, kern.ipc, to store 1997-02-24 20:30:58 +00:00
uipc_proto.c Create a new branch of the kernel MIB, kern.ipc, to store 1997-02-24 20:30:58 +00:00
uipc_sockbuf.c In accept1(), falloc() is called after the process has awoken, but prior 1997-03-31 12:30:01 +00:00
uipc_socket2.c In accept1(), falloc() is called after the process has awoken, but prior 1997-03-31 12:30:01 +00:00
uipc_socket.c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined. 1997-03-23 03:37:54 +00:00
uipc_syscalls.c In accept1(), falloc() is called after the process has awoken, but prior 1997-03-31 12:30:01 +00:00
uipc_usrreq.c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined. 1997-03-23 03:37:54 +00:00
vfs_bio.c Removed potentially harmful garbage <vm/lock.h> and fixed bogus 1997-04-01 08:39:07 +00:00
vfs_cache.c Fixed the hash formula. Lite2 doesn't have phashinit(), so Lite2's hash 1997-03-08 15:22:14 +00:00
vfs_cluster.c Use OID_AUTO instead of magic number for the old sysctl debug.rcluster. 1997-04-01 11:48:30 +00:00
vfs_conf.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vfs_export.c Add a function vop_sharedlock which a copy of vop_nolock without the 1997-04-04 17:46:21 +00:00
vfs_extattr.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vfs_init.c Moved vfs sysctls to where Lite2 put them. No code changes yet. 1997-03-02 11:06:22 +00:00
vfs_lookup.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vfs_mount.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vfs_subr.c Add a function vop_sharedlock which a copy of vop_nolock without the 1997-04-04 17:46:21 +00:00
vfs_syscalls.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vfs_vnops.c [Previous comment was incorrect for these files] 1997-04-04 17:47:43 +00:00
vnode_if.pl Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vnode_if.sh Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
vnode_if.src This is the kernel Lite/2 commit. There are some requisite userland 1997-02-10 02:22:35 +00:00