git: nvmm: Port to DragonFly #21: virtual address space management

Aaron LI aly at crater.dragonflybsd.org
Tue Jul 20 16:30:19 PDT 2021


commit fe7b14d632ffc4e8b0a257d206a1b547ae6c8604
Author: Aaron LI <aly at aaronly.me>
Date:   Sun May 23 18:13:54 2021 +0800

    nvmm: Port to DragonFly #21: virtual address space management
    
    Adapt the following NetBSD UVM functions to DragonFly:
    
    * uvmspace_alloc() -> vmspace_alloc()
    * uvmspace_free() -> vmspace_rel()
    * uvm_fault() -> vm_fault()
    * uvm_map() -> vm_map_insert() + vm_map_inherit() + vm_map_madvise() ...
    * uvm_map_pageable() -> vm_map_wire()
    * uvm_unmap(), uvm_deallocate() -> vm_map_remove()
    
    To support the UVM_FLAG_FIXED & UVM_FLAG_UNMAP flags in uvm_map(),
    vm_map_delete() is called unconditionally to make room fot the coming
    new mapping.  Note that vm_map_findspace() cannot be called in this case,
    because it's not guaranteed to return the input hint address if the
    hint range is available.
    
    Use vm_map_wire() to wire/unwire the mapping; vm_map_unwire() is for
    userland mlock operations.
    
    In uvm_deallocate(), need to unwire kernel page before remove, because
    vm_map_remove() only handles user wirings.
    
    Reviewed-by: Matt Dillon

Summary of changes:
 sys/dev/virtual/nvmm/nvmm_compat.h | 145 +++++++++++++++++++++++++++++++++++++
 1 file changed, 145 insertions(+)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list