git: kernel - VM rework part 15 - Core pmap work, refactor PG_*

Matthew Dillon dillon at crater.dragonflybsd.org
Tue May 21 10:26:28 PDT 2019


commit 831a850787c9f10e26859cda6911277adf3477f5
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon May 20 09:29:43 2019 -0700

    kernel - VM rework part 15 - Core pmap work, refactor PG_*
    
    * Augment PG_FICTITIOUS.  This takes over some of PG_UNMANAGED's previous
      capabilities.  In addition, the pmap_*() API will work with fictitious
      pages, making mmap() operation (aka of the GPU) more consistent.
    
    * Add PG_UNQUEUED.  This prevents a vm_page from being manipulated in
      the vm_page_queues[] in any way.  This takes over another feature
      of the old PG_UNMANAGED flag.
    
    * Remove PG_UNMANAGED
    
    * Remove PG_DEVICE_IDX.  This is no longer relevant.  We use PG_FICTITIOUS
      for all device pages.
    
    * Refactor vm_contig_pg_alloc(), vm_contig_pg_free(),
      vm_page_alloc_contig(), and vm_page_free_contig().
    
      These functions now set PG_FICTITIOUS | PG_UNQUEUED on the returned
      pages, and properly clear the bits upon free or if/when a regular
      (but special contig-managed) page is handed over to the normal paging
      system.
    
      This is combined with making the pmap*() functions work better with
      PG_FICTITIOUS is the primary 'fix' for some of DRMs hacks.

Summary of changes:
 sys/platform/pc64/include/pmap.h |   2 +-
 sys/platform/pc64/vmm/ept.c      |   2 +-
 sys/platform/pc64/x86_64/pmap.c  | 121 +++++++++++++++------------------
 sys/vm/device_pager.c            |   8 +--
 sys/vm/phys_pager.c              |   2 +-
 sys/vm/vm_contig.c               |  14 ++--
 sys/vm/vm_fault.c                |   4 +-
 sys/vm/vm_object.c               |   3 +-
 sys/vm/vm_page.c                 | 143 +++++++++++++++++++--------------------
 sys/vm/vm_page.h                 |  81 ++++++++++++++--------
 sys/vm/vm_pageout.c              |  10 +--
 sys/vm/vm_swapcache.c            |   2 +-
 12 files changed, 205 insertions(+), 187 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/831a850787c9f10e26859cda6911277adf3477f5


-- 
DragonFly BSD source repository


More information about the Commits mailing list