Source-Changes archive

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

CVS commit: src/sys/arch



Module Name:    src
Committed By:   ad
Date:           Sat Jan  4 22:49:20 UTC 2020

Modified Files:
        src/sys/arch/x86/include: pmap.h pmap_pv.h
        src/sys/arch/x86/x86: pmap.c
        src/sys/arch/xen/x86: xen_pmap.c

Log Message:
x86 pmap improvements, reducing system time during a build by about 15% on
my test machine:

- Replace the global pv_hash with a per-pmap record of dynamically allocated
  pv entries.  The data structure used for this can be changed easily, and
  has no special concurrency requirements.  For now go with radixtree.

- Change pmap_pdp_cache back into a pool; cache the page directory with the
  pmap, and avoid contention on pmaps_lock by adjusting the global list in
  the pool_cache ctor & dtor.  Align struct pmap and its lock, and update
  some comments.

- Simplify pv_entry lists slightly.  Allow both PP_EMBEDDED and dynamically
  allocated entries to co-exist on a single page.  This adds a pointer to
  struct vm_page on x86, but shrinks pv_entry to 32 bytes (which also gets
  it nicely aligned).

- More elegantly solve the chicken-and-egg problem introduced into the pmap
  with radixtree lookup for pages, where we need PTEs mapped and page
  allocations to happen under a single hold of the pmap's lock.  While here
  undo some cut-n-paste.

- Don't adjust pmap_kernel's stats with atomics, because its mutex is now
  held in the places the stats are changed.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/pmap_pv.h
cvs rdiff -u -r1.352 -r1.353 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/xen/x86/xen_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index