git: hammer2 - Fix excess chain structure allocations during bulkfree (3)

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Mar 11 17:23:13 PST 2022


commit f7a9ce16252aa547c85ff84ec40272848e5587bd
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Mar 11 17:18:38 2022 -0800

    hammer2 - Fix excess chain structure allocations during bulkfree (3)
    
    * Fix excess chain structure allocations during bulkfree, AGAIN.
      This time for real.  The algorithmic change I made was not sufficient,
      because I was not backing-out the recursion all the way after hitting
      a deferral.  Instead, the code was re-recursing down another branch
      while still really deep into the tree.
    
      The problem was mostly triggered on the inode radix tree for filesystems
      containing many inodes (like a hundred million inodes), and would lead
      to a kmalloc panic due to memory exhaustion.
    
    * Fixed for real this time.  When we hit the recursion limit, the code
      fully backs out of the traversal (recording its placemarkers on the way
      back up), then starts again at the deepest placemarker rather than
      the shallowest placemarker.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 39 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 37 insertions(+), 2 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list