Re: [PATCH 4/6] rbtree: faster augmented insert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/20/2012 08:31 AM, Michel Lespinasse wrote:
Introduce rb_insert_augmented(), which is a version of rb_insert_color()
with an added callback on tree rotations. This can be used for insertion
into an augmented tree: the handcoded search phase must be updated to
maintain the augmented information on insertion, and then the rbtree
coloring/rebalancing algorithms keep it up to date.

rb_insert_color() is now a special case of rb_insert_augmented() with
a do-nothing callback. I used inlining to optimize out the callback,
with the intent that this would generate the same code as previously
for rb_insert_augmented(). This didn't fully work, as my compiler output
is now *smaller* than before for that function. Speed wise, they seem
comparable though.

Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx>

The second version of patch 5/6 takes care of my
concerns about this patch.

Acked-by: Rik van Riel <riel@xxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]