[PATCH v2 08/12] rbtree: low level optimizations in rb_insert_color()

2012-07-12 Thread Michel Lespinasse
- Use the newly introduced rb_set_parent_color() function to flip the color of nodes whose parent is already known. - Optimize rb_parent() when the node is known to be red - there is no need to mask out the color in that case. - Flipping gparent's color to red requires us to fetch its

[PATCH v2 08/12] rbtree: low level optimizations in rb_insert_color()

2012-07-12 Thread Michel Lespinasse
- Use the newly introduced rb_set_parent_color() function to flip the color of nodes whose parent is already known. - Optimize rb_parent() when the node is known to be red - there is no need to mask out the color in that case. - Flipping gparent's color to red requires us to fetch its