DragonFly BSD
DragonFly commits List (threaded) for 2009-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - pmap (i386) - Refactor the foreign pmap mapping


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Dec 2009 11:47:55 -0800 (PST)

commit c1692ddf9735ab0d85ef3a98b211dbf18f142f81
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Wed Dec 30 11:38:39 2009 -0800

    kernel - pmap (i386) - Refactor the foreign pmap mapping
    
    * Remove the global alternative pmap and related hacks.  Leave
      the PTD entry reserved because I really do not want to
      change the location of MPPTDI (The PDE via which the
      globaldata array is mapped).
    
    * Reserve SMP_MAXCPU (16) PTDs in the kernel page table for
      per-cpu page table maps.  This eats about 64MB of KVM
      (not 64M of physical memory).
    
    * Adjust get_ptbase() in platform/pc32/i386/pmap.c to use the
      per-cpu map.  This greatly simplifies the tracking required
      to determine when a cpu_invltlb() call is required.
    
      get_ptbase() is now MPSAFE but the rest of the pmap system
      is not, yet.  This is a big step though.
    
    * Note that because these are PTD mappings and not PTE mappings,
      each process pmap gets its own set, and because processes
      may be threaded the new get_ptbase() still WILL NOT safely
      survive a thread switch.
    
      On the otherhand, for vkernels, this inherent (process pmap x NCPU)
      pagetable mapping cache should work quite efficiently.  The
      vkernel threads running on different physical cpus will get their
      own page table map cache ptd.

Summary of changes:
 sys/platform/pc32/i386/genassym.c      |    1 +
 sys/platform/pc32/i386/mp_machdep.c    |    2 +
 sys/platform/pc32/i386/pmap.c          |   73 ++++++++++++++++++-------------
 sys/platform/pc32/include/globaldata.h |    4 +-
 sys/platform/pc32/include/pmap.h       |   64 ++++++++++++++++++++--------
 5 files changed, 94 insertions(+), 50 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c1692ddf9735ab0d85ef3a98b211dbf18f142f81


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]