[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1343419375.32120.48.camel@twins>
Date: Fri, 27 Jul 2012 22:02:55 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Michel Lespinasse <walken@...gle.com>
Cc: riel@...hat.com, daniel.santos@...ox.com, aarcange@...hat.com,
dwmw2@...radead.org, akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] rbtree: faster augmented erase
On Fri, 2012-07-20 at 05:31 -0700, Michel Lespinasse wrote:
> +static inline void
> +rb_erase_augmented(struct rb_node *node, struct rb_root *root,
> + rb_augment_propagate *augment_propagate,
> + rb_augment_rotate *augment_rotate)
So why put all this in a static inline in a header? As it stands
rb_erase() isn't inlined and its rather big, why would you want to
inline it for augmented callers?
You could at least pull out the initial erase stuff into a separate
function, that way the rb_erase_augmented thing would shrink to
something like:
rb_erase_augmented(node, root)
{
struct rb_node *parent, *child;
bool black;
__rb_erase(node, root, &parent, &child, &black);
augmented_propagate(parent);
if (black)
__rb_erase_color(child, parent, root, augment_rotate);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists