[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000ff2757fc24d91ade7cab0195ab9b4@baidu.com>
Date: Wed, 25 Aug 2021 18:26:59 +0000
From: "Li,Rongqing" <lirongqing@...du.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Michel Lespinasse <michel@...pinasse.org>,
"dbueso@...e.de" <dbueso@...e.de>,
"mingo@...nel.org" <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 答复: 答复: [PATCH] rbtree: stop iteration early in rb_find_first
On Wed, Aug 25, 2021 at 04:01:53PM +0000, Li,Rongqing wrote:
>
> >>
> >>
> >> 10
> >> /
> >> 5
> >> \
> >> 10
>That again breaks the above case.
10
/
5
\
10
the above case should not exist. like below, when second 10 is inserted, it should be inserted to right leaf
10
/
5
as a result, it should be
10
/ \
5 10
since 10 is not less 10, so new 10 is inserted to right.
and it depends on
bool (*less)(struct rb_node *, const struct rb_node *) which not return true when equal
this case should be ok
10
\
12
/
10
-Li
Powered by blists - more mailing lists