Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 2003 03:41:35 -0800 (PST)
From:      David Xu <davidxu@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/alpha/alpha trap.c vm_machdep.c src/sys/ddb db_ps.c src/sys/i386/i386 critical.c exception.s genassym.c trap.c vm_machdep.c src/sys/ia64/ia64 trap.c vm_machdep.c src/sys/kern init_main.c kern_clock.c kern_exec.c kern_exit.c kern_fork.c ...
Message-ID:  <200301261141.h0QBfZxZ001813@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
davidxu     2003/01/26 03:41:35 PST

  Modified files:
    sys/alpha/alpha      trap.c vm_machdep.c 
    sys/ddb              db_ps.c 
    sys/i386/i386        critical.c exception.s genassym.c trap.c 
                         vm_machdep.c 
    sys/ia64/ia64        trap.c vm_machdep.c 
    sys/kern             init_main.c kern_clock.c kern_exec.c 
                         kern_exit.c kern_fork.c kern_lock.c 
                         kern_resource.c kern_sig.c kern_switch.c 
                         kern_thread.c subr_prof.c subr_trap.c 
                         subr_witness.c 
    sys/powerpc/powerpc  vm_machdep.c 
    sys/sparc64/sparc64  trap.c vm_machdep.c 
    sys/sys              buf.h lockmgr.h proc.h resourcevar.h 
                         systm.h 
  Log:
  Move UPCALL related data structure out of kse, introduce a new
  data structure called kse_upcall to manage UPCALL. All KSE binding
  and loaning code are gone.
  
  A thread owns an upcall can collect all completed syscall contexts in
  its ksegrp, turn itself into UPCALL mode, and takes those contexts back
  to userland. Any thread without upcall structure has to export their
  contexts and exit at user boundary.
  
  Any thread running in user mode owns an upcall structure, when it enters
  kernel, if the kse mailbox's current thread pointer is not NULL, then
  when the thread is blocked in kernel, a new UPCALL thread is created and
  the upcall structure is transfered to the new UPCALL thread. if the kse
  mailbox's current thread pointer is NULL, then when a thread is blocked
  in kernel, no UPCALL thread will be created.
  
  Each upcall always has an owner thread. Userland can remove an upcall by
  calling kse_exit, when all upcalls in ksegrp are removed, the group is
  atomatically shutdown. An upcall owner thread also exits when process is
  in exiting state. when an owner thread exits, the upcall it owns is also
  removed.
  
  KSE is a pure scheduler entity. it represents a virtual cpu. when a thread
  is running, it always has a KSE associated with it. scheduler is free to
  assign a KSE to thread according thread priority, if thread priority is changed,
  KSE can be moved from one thread to another.
  
  When a ksegrp is created, there is always N KSEs created in the group. the
  N is the number of physical cpu in the current system. This makes it is
  possible that even an userland UTS is single CPU safe, threads in kernel still
  can execute on different cpu in parallel. Userland calls kse_create to add more
  upcall structures into ksegrp to increase concurrent in userland itself, kernel
  is not restricted by number of upcalls userland provides.
  
  The code hasn't been tested under SMP by author due to lack of hardware.
  
  Reviewed by: julian
  
  Revision  Changes    Path
  1.103     +2 -2      src/sys/alpha/alpha/trap.c
  1.80      +1 -1      src/sys/alpha/alpha/vm_machdep.c
  1.37      +0 -9      src/sys/ddb/db_ps.c
  1.5       +1 -1      src/sys/i386/i386/critical.c
  1.100     +3 -0      src/sys/i386/i386/exception.s
  1.133     +1 -0      src/sys/i386/i386/genassym.c
  1.238     +2 -2      src/sys/i386/i386/trap.c
  1.199     +4 -6      src/sys/i386/i386/vm_machdep.c
  1.66      +3 -3      src/sys/ia64/ia64/trap.c
  1.54      +1 -1      src/sys/ia64/ia64/vm_machdep.c
  1.220     +0 -1      src/sys/kern/init_main.c
  1.144     +37 -18    src/sys/kern/kern_clock.c
  1.211     +0 -3      src/sys/kern/kern_exec.c
  1.191     +4 -14     src/sys/kern/kern_exit.c
  1.180     +0 -2      src/sys/kern/kern_fork.c
  1.61      +20 -20    src/sys/kern/kern_lock.c
  1.114     +59 -73    src/sys/kern/kern_resource.c
  1.202     +0 -6      src/sys/kern/kern_sig.c
  1.48      +56 -178   src/sys/kern/kern_switch.c
  1.77      +646 -513  src/sys/kern/kern_thread.c
  1.59      +47 -22    src/sys/kern/subr_prof.c
  1.240     +31 -24    src/sys/kern/subr_trap.c
  1.134     +1 -1      src/sys/kern/subr_witness.c
  1.83      +1 -1      src/sys/powerpc/powerpc/vm_machdep.c
  1.52      +2 -2      src/sys/sparc64/sparc64/trap.c
  1.36      +1 -1      src/sys/sparc64/sparc64/vm_machdep.c
  1.141     +1 -1      src/sys/sys/buf.h
  1.36      +4 -4      src/sys/sys/lockmgr.h
  1.290     +72 -74    src/sys/sys/proc.h
  1.31      +2 -4      src/sys/sys/resourcevar.h
  1.186     +1 -1      src/sys/sys/systm.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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