git: kernel - Implement type-stable EXIS semantics for kfree_obj() - step 2

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Mar 21 22:46:13 PDT 2021


commit 56c9ecc85b5c36e00f04a27a5f282a5bc4f5f006
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Mar 21 22:17:43 2021 -0700

    kernel - Implement type-stable EXIS semantics for kfree_obj() - step 2
    
    * Put an exislock_t in the kmalloc_slab structure and issue
      exis_terminate() upon entering the slab on the full list.
    
    * Do not return a full slab to the gcache until it becomes
      exis_freeable().
    
      This implements type-stable operation for objects allocated via the
      kmalloc_obj() mechanism.  Kernel code operating inside an
      exis_hold() / exis_drop() sequence is guaranteed type-stability.
    
    * Note that destroying a kmalloc_obj zone shreds any related slabs
      regardless of their EXIS state.  However, this is not a problem
      for the zones we care about because they are global zones that
      will never be destroyed.

Summary of changes:
 sys/kern/kern_kmalloc.c   | 54 +++++++++++++++++++++++++++++------------------
 sys/kern/kern_slaballoc.c |  3 +++
 sys/sys/_malloc.h         |  2 ++
 3 files changed, 38 insertions(+), 21 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/56c9ecc85b5c36e00f04a27a5f282a5bc4f5f006


-- 
DragonFly BSD source repository



More information about the Commits mailing list