git: kernel - VM rework part 14 - Core pmap work, stabilize for X/drm

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


commit f16f9121796592a356f4962da34e7071339e4e1f
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun May 19 18:48:30 2019 -0700

    kernel - VM rework part 14 - Core pmap work, stabilize for X/drm
    
    * Don't gratuitously change the vm_page flags in the drm code.
    
      The vm_phys_fictitious_reg_range() code in drm_vm.c was clearing
      PG_UNMANAGED.  It was only luck that this worked before, but
      because these are faked pages, PG_UNMANAGED must be set or the
      system will implode trying to convert the physical address back
      to a vm_page in certain routines.
    
      The ttm code was setting PG_FICTITIOUS in order to prevent the
      page from getting into the active or inactive queues (they had
      a conditional test for PG_FICTITIOUS).  But ttm never cleared
      the bit before freeing the page.  Remove the hack and instead
      fix it in vm_page.c
    
    * in vm_object_terminate(), allow the case where there are still
      wired pages in a OBJT_MGTDEVICE object that has wound up on a
      queue (don't complain about it).  This situation arises because the
      ttm code uses the contig malloc API which returns wired pages.
    
      NOTE: vm_page_activate()/vm_page_deactivate() are allowed to mess
    	with wired pages.  Wired pages are not anything 'special' to
    	the queues, which allows us to avoid messing with the queues
    	when pages are assigned to the buffer cache.

Summary of changes:
 sys/dev/drm/drm_vm.c             |  1 -
 sys/dev/drm/ttm/ttm_page_alloc.c |  7 ++--
 sys/platform/pc64/x86_64/pmap.c  | 85 ----------------------------------------
 sys/vm/device_pager.c            |  2 +-
 sys/vm/vm_page.c                 | 36 ++++++++++++++---
 5 files changed, 35 insertions(+), 96 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list