Re: [PATCH] rbtree: undo augmented damage -v2
From: Venkatesh Pallipadi
Date: Tue Jun 01 2010 - 14:09:42 EST
On Tue, Jun 1, 2010 at 10:42 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Tue, 2010-06-01 at 10:34 -0700, Venkatesh Pallipadi wrote:
>>
>> Yes. This will cover all the cases on insert. But on erase, there is
>> still a case where a rotate of sibling node is done during the
>> re-coloration process. There we have a child change on sibling's
>> child. I am not able to think of any easy way to handle that case.
>
> Let me go draw some figures with pen and paper to match up the erase
> path with the rb_augment_erase_begin() code, because I can't quite spot
> the case we're missing.
>
> If you have it handy, ascii art might help..
It is this case
P
/ \
N S
/ \
SL SR
changing to
P
/ \
N SL
\
S
\
SR
This can happen in __rb_erase_color, where 'other' points to sibling node.
Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/