HomeFreeBSD

rb_tree: update augmentation after element change

Description

rb_tree: update augmentation after element change

For an augmented rb_tree, allow a faster alternative to removing an
element from the tree, tweaking it slightly, and inserting it back
into the tree, knowing that its relative position in the tree is
unchanged. Instead, just change the element and invoke
RB_UPDATE_AUGMENT to fix the augmentation data for all the nodes in
the tree.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36010

Details

Provenance
dougmAuthored on Aug 2 2022, 4:19 PM
Reviewer
kib
Differential Revision
D36010: rb_tree: allow augmentation update after element change
Parents
rG3dce6f96e515: tcp.4: Add missing sysctls, other fixes
Branches
Unknown
Tags
Unknown