diff options
| author | Michel Lespinasse <[email protected]> | 2012-10-08 16:31:11 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-10-09 16:22:37 +0900 |
| commit | 46b6135a7402ac23c5b25f2bd79b03bab8f98278 (patch) | |
| tree | 8430c191a455b1ff48c62229731ded4cbc71a9a1 /tools/perf/scripts/python | |
| parent | 60670b8034d6e2ba860af79c9379b7788d09db73 (diff) | |
rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()
An interesting observation for rb_erase() is that when a node has
exactly one child, the node must be black and the child must be red.
An interesting consequence is that removing such a node can be done by
simply replacing it with its child and making the child black,
which we can do efficiently in rb_erase(). __rb_erase_color() then
only needs to handle the no-childs case and can be modified accordingly.
Signed-off-by: Michel Lespinasse <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions