Re: [PATCH 6/8] rbtree: Implement generic latch_tree

From: Peter Zijlstra
Date: Thu Mar 19 2015 - 03:25:39 EST


On Wed, Mar 18, 2015 at 10:14:46PM -0700, Andrew Morton wrote:
> On Wed, 18 Mar 2015 14:36:32 +0100 Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > include/linux/rbtree_latch.h | 223 +++++++++++++++++++++++++++++++++++++++++++
>
> Did it really need to all be inlined?

Without that you get actual function calls to the less() and comp()
operators. This way GCC can inline the lot even though its function
pointers.

The typical RB tree user open-codes all this every single time.

> How much of this code is unneeded on uniprocessor?

None, UP has NMIs too.
--
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/