Messages in this thread | | | Date | Thu, 19 Mar 2015 23:10:21 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH 6/8] rbtree: Implement generic latch_tree |
| |
On Thu, Mar 19, 2015 at 01:58:33PM -0700, Andrew Morton wrote: > On Thu, 19 Mar 2015 08:25:02 +0100 Peter Zijlstra <peterz@infradead.org> wrote: > > > 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@infradead.org> 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. > > Is it a good tradeoff?
Is what? Writing it like this or open-coding it all?
For many archs (indirect) function calls are far more expensive than the typical comparison.
| |