opnsense-src/sys/compat/linuxkpi/common/include
Doug Moore 02d0c43c9e rb_tree: speed-up double rotation
RB_ROTATE_LEFT (and it symmetric twin) modify the rb-tree, adjusting
pointers so that what started as a proper tree ends up a proper
tree. When two consecutive rotations move the same node up the tree,
some of the pointers changed in the first rotation are immediately
changed again in the second - namely, the pointer from the rising node
to its new parent, and the pointer from that parent back to the rising
node. This change removes from RB_ROTATE macros the responsibility for
managing those two pointers, and leaves it to the code that calls for
rotations to fix up those pointers afterward. That drops a comparison
and a pair of assignments from every INSERT_COLOR or REMOVE_COLOR call
that ends in a double rotation.

A side-effect of this change is that the SWAP_CHILD macro must take as
a parameter a pointer to the node that is changing children, where it
is now computed from the old child. Since this macro is called in a
couple of places besides the RB_ROTATE macros, those calls are also
affected.

Reviewed by:	alc
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D36266
2022-08-19 18:11:29 -05:00
..
acpi linuxkpi: acpi/video.h: Add stubs acpi_video_{register,unregister} 2022-08-18 09:47:07 +02:00
asm linuxkpi: Add asm/processor.h 2022-08-18 09:46:43 +02:00
asm-generic linuxkpi: Add io.h 2022-08-08 15:22:35 +02:00
linux rb_tree: speed-up double rotation 2022-08-19 18:11:29 -05:00
net net80211: LinuxKPI 802.11: harmonize IEEE80211_VHT_MCS_* 2022-08-18 20:34:30 +00:00
video linuxkpi: Add video/mipi_display.h 2022-08-18 09:47:12 +02:00
stdarg.h LinuxKPI: Add stdarg.h proxy header 2022-01-10 22:49:37 +03:00