Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 1997 00:16:08 -0700 (PDT)
From:      Peter Wemm <peter>
To:        CVS-committers, cvs-all, cvs-sys
Subject:   cvs commit:  src/sys/i386/include cpu.h src/sys/kern init_main.c kern_exit.c kern_fork.c src/sys/sys proc.h src/sys/i386/i386 exception.s genassym.c locore.s machdep.c pmap.c swtch.s symbols.raw trap.c vm_machdep.c src/sys/vm vm_extern.h vm_glue.c vm_map.c vm_map.h
Message-ID:  <199704070716.AAA27557@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
peter       97/04/07 00:16:07

  Modified:    sys/i386/i386  exception.s genassym.c locore.s machdep.c
                        pmap.c swtch.s  symbols.raw trap.c vm_machdep.c
               sys/i386/include  cpu.h
               sys/kern  init_main.c kern_exit.c kern_fork.c
               sys/sys   proc.h
               sys/vm    vm_extern.h vm_glue.c vm_map.c vm_map.h
  Log:
  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.
  
  Revision  Changes    Path
  1.22      +15 -1     src/sys/i386/i386/exception.s
  1.44      +4 -1      src/sys/i386/i386/genassym.c
  1.83      +13 -12    src/sys/i386/i386/locore.s
  1.236     +19 -10    src/sys/i386/i386/machdep.c
  1.139     +18 -51    src/sys/i386/i386/pmap.c
  1.44      +42 -1     src/sys/i386/i386/swtch.s
  1.9       +1 -2      src/sys/i386/i386/symbols.raw
  1.91      +20 -1     src/sys/i386/i386/trap.c
  1.78      +61 -37    src/sys/i386/i386/vm_machdep.c
  1.29      +5 -1      src/sys/i386/include/cpu.h
  1.60      +12 -36    src/sys/kern/init_main.c
  1.47      +3 -3      src/sys/kern/kern_exit.c
  1.33      +6 -28     src/sys/kern/kern_fork.c
  1.34      +3 -2      src/sys/sys/proc.h
  1.33      +2 -2      src/sys/vm/vm_extern.h
  1.62      +18 -16    src/sys/vm/vm_glue.c
  1.75      +1 -4      src/sys/vm/vm_map.c
  1.26      +1 -2      src/sys/vm/vm_map.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704070716.AAA27557>